On Thu, 3 Jun 2004 00:34:10 +0900, Carl Youngblood wrote
> David Heinemeier Hansson wrote:
> 
> > Be aware, though, that the objects will not have their instance data  
[WINDOWS-1252?]> > returned to their state before the transaction started. 
YouÁÍl have 
> > to  deal with that yourself (just as in the case of Validations). Also 
> > have  in mind that exceptions thrown within a transaction block will 
> > be  propagated (after triggering the ROLLBACK), so you should be ready 
> > to  catch those in your application code.
> 
> Is this for performance reasons?  It seems like it wouldn't be too 
> hard to undo the changes to instance data if an exception were thrown.

Oh, duh.  Read better, Kirk.  Hopefully you disregarded the last question.

In Kansas I also rollback the objects, but it does introduce some 
interesting wrinkles.  I'm playing with the rollback code a bit for the 
upcoming next release.  I don't think it'd be very hard to do something 
similar to what I am doing in ActiveRecord, though.


Kirk Haines