first cut at sanitising multi-create/new_related etc., a couple things don't work...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSource.pm
index 2c71640..3ac1d3c 100644 (file)
@@ -825,6 +825,8 @@ a related conditional from that object.
 
 =cut
 
+our $UNRESOLVABLE_CONDITION = \'1 = 0';
+
 sub resolve_condition {
   my ($self, $cond, $as, $for) = @_;
   #warn %$cond;
@@ -843,7 +845,7 @@ sub resolve_condition {
           if ($for->in_storage) {
             $self->throw_exception("Column ${v} not loaded on ${for} trying to reolve relationship");
           }
-          return [ \'1 = 0' ];
+          return [ $UNRESOLVABLE_CONDITION ];
         }
         $ret{$k} = $for->get_column($v);
         #$ret{$k} = $for->get_column($v) if $for->has_column_loaded($v);