From 76b92189b37b84fed8fff6df90966e9c0d4d581b Mon Sep 17 00:00:00 2001 From: zby Date: Thu, 6 Nov 2008 11:05:52 +0000 Subject: [PATCH] insert in ResultSet now recurses - we don't want this --- lib/DBIx/Class/ResultSet/RecursiveUpdate.pm | 2 ++ t/var/dvdzbr.db | Bin 26624 -> 26624 bytes 2 files changed, 2 insertions(+) diff --git a/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm b/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm index 7115aaa..39366e7 100644 --- a/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm +++ b/lib/DBIx/Class/ResultSet/RecursiveUpdate.pm @@ -44,6 +44,8 @@ sub recursive_update { #warn Dumper($object->{_column_data}); use Data::Dumper; } $self->_delete_empty_auto_increment($object); + # don't allow insert to recurse to related objects - we do the recursion ourselves + $object->{_rel_in_storage} = 1; $object->update_or_insert; # updating relations that can be done only after the row is inserted into the database diff --git a/t/var/dvdzbr.db b/t/var/dvdzbr.db index c279b90af5bd6b1cb92622e17086708918e5ff1a..86a55809d2fd6e8490bc3e06e1cd7a657d15e317 100644 GIT binary patch delta 612 zcma)3O=uHA6rPzkyR%JbO=1$8R^32!bI3MZV`|k@?6C?h6?!YhHnJf7F}B%W1fe+z zf?{|#Z+g{(&0ahPnWL5k&TOImrC{g`R zdMBem5K{cOZNG;;SyJDK9P9V#6z6d$6KKOrcnX`a2sfd;-8c(_Nnwy2p-SnwYxlGF zme$;CNlWTD8BHZLgP4RWa?Y)LA&2$olXN5~1A7F%z#bgJFZc<6pzFu^JLuy;s0bcB z7|$gH>=MNtLN`=>hFzs<19mE!E;OK2!-I<1N`4S&0h&+=!8Bcg&a{Bm{cpov$Ote5 zrvWKK)S2Exf8R7UCLKIFx6kA#em!5H9M`QBW-W)w3wX;iRgHD4$Ycp$SPz)Ih-dOP zlVyA}lg8zl7#+Z!{2)Hg4>LKYk`_JT@8lnHCa+=B8N%oG0A}u-#-=^OaDD%a5ERdLERX=C17s;;`5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