cache rsrc properly in NoBindVars, return undef if no rsrc
[dbsrgits/DBIx-Class-Historic.git] / lib / DBIx / Class / Storage / DBI / NoBindVars.pm
index eac8295..3256846 100644 (file)
@@ -62,7 +62,7 @@ sub _prep_for_execute {
 
     my $rsrc = $alias2src->{$alias};
 
-    my $datatype = $rsrc->column_info($col)->{data_type};
+    my $datatype = $rsrc && $rsrc->column_info($col)->{data_type};
 
     foreach my $data (@$bound) {
         if(ref $data) {