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

and then in the transaction code ...

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

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!

List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

Reply via email to