On Fri, Feb 20, 2004 at 10:58:58AM -0500, Casey Duncan wrote:
> > As a sanity check, you might consider calling
> > get_transaction().commit() every time.  If there have been no changes,
> > it does no harm.  Alternatively, you can call
> > get_transaction().abort() if no changes were intended.  A third
> > alternative is to assert that get_transaction()._objects is empty when
> > you made no changes (although that's not a public API.)
> 
> Hmm, maybe a get_transaction().ismodifed() method that returned True if
> there were changes made in the transaction would be useful as a public
> API?
> 
> Or, a crazier idea, may the transaction object should be iterable (or
> have a method that returns an iterator) of the modified objects in the
> transaction?

Well, I raised this issue a bit back, and right now I'm curious: how do
you find out what objects were modified in subtransactions? If that's
easy to discover, then adding API (is_modified() or whatever) is the
trivial part.

Take care,
--
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 261 2331


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to