prevent objects implicitly passed via new_related having insertion cascaded to them...
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / ResultSet.pm
index 28b2f9a..92cbbd7 100644 (file)
@@ -1701,6 +1701,7 @@ sub new_result {
     && $self->{cond} eq $DBIx::Class::ResultSource::UNRESOLVABLE_CONDITION
   ) {
     %new = %{$self->{attrs}{related_objects}};
+    $new{-from_resultset} = [ keys %new ] if keys %new;
   } else {
     $self->throw_exception(
       "Can't abstract implicit construct, condition not a hash"