[CDBI] Re: Transaction over parent and children has_a objects
Edward J. Sabol
sabol at alderaan.gsfc.nasa.gov
Tue Aug 9 03:49:43 BST 2005
> SO, based on all of the info together, it looks like all I have
> to do is localize AutoCommit and commit/rollback, and it Just
> Works for child relationships?
Yes. Once AutoCommit is off, it doesn't matter if autoupdate is on or not.
AutoCommit is a connection setting, so it will apply to all of your classes
which inherit from your base class.
The only affect autoupdate might have is the number of SQL statements that
are committed as part of the transaction. Turning autoupdate off inside the
transaction might make it more efficient. I can't say with any certainty as
I've never profiled it. But it shouldn't be necessary.
More information about the ClassDBI