[Bast-commits] r3299 - branches/DBIx-Class/bulk_create/lib/DBIx/Class

matthewt at dev.catalyst.perl.org matthewt at dev.catalyst.perl.org
Fri May 11 04:44:20 GMT 2007


Author: matthewt
Date: 2007-05-11 04:44:20 +0100 (Fri, 11 May 2007)
New Revision: 3299

Modified:
   branches/DBIx-Class/bulk_create/lib/DBIx/Class/Row.pm
Log:
minor fixup to bulk_create

Modified: branches/DBIx-Class/bulk_create/lib/DBIx/Class/Row.pm
===================================================================
--- branches/DBIx-Class/bulk_create/lib/DBIx/Class/Row.pm	2007-05-11 03:40:44 UTC (rev 3298)
+++ branches/DBIx-Class/bulk_create/lib/DBIx/Class/Row.pm	2007-05-11 03:44:20 UTC (rev 3299)
@@ -97,8 +97,8 @@
           ## 'filter' should disappear and get merged in with 'single' above!
           my $rel_obj = delete $attrs->{$key};
           if(!Scalar::Util::blessed($rel_obj)) {
-            $rel_obj = $new->new_related($key, $rel_obj);
-            $new->{_rel_in_storage} = 0;
+            $rel_obj = $new->find_or_new_related($key, $rel_obj);
+            $new->{_rel_in_storage} = 0 unless ($rel_obj->in_storage);
           }
           $inflated->{$key} = $rel_obj;
           next;




More information about the Bast-commits mailing list