[Dbix-class] DBIx::Class::Relationship::CascadeActions::delete(): Not in database

David Cantrell david at cantrell.org.uk
Wed Mar 27 13:54:00 GMT 2013


On Wed, Mar 27, 2013 at 11:49:53PM +1100, Peter Rabbitson wrote:
> On Wed, Mar 27, 2013 at 12:30:03PM +0000, David Cantrell wrote:
> > Eeuuww!
> > I would thunk that in_storage should be "rolled back" too.
> How would you implement that? (as in how would the perl logic actually 
> look)

in the code that flips that bit ...

if we're in a transaction
  store in the transaction (handwave handwave, i've not looked at the code)
    a tuple of [ref to object we're updating, the old value of in_storage]
  update it
fi

and then in the transaction code ...

if the transaction gets rolled back
  go through that list of tuples, resetting in_storage on each object
fi

If you think that these half-arsed ideas seem plausible, then please
point me at the right places that I can shim them in!

-- 
David Cantrell | top google result for "topless karaoke murders"

         Nuke a disabled unborn gay baby whale for JESUS!



More information about the DBIx-Class mailing list