On Jun 29, 2008, at 11:23 AM, sandro dentella wrote:
> > Hi, > > is there a way to say to a session to forget all the changes to an > object without hitting the database. Expire or refresh do that but at > the prize of a new select. there is not because for it to be generally useful, it needs to synchronize with the current transaction in progress - which then results in all sorts of nasty questions such as what do we do for elements that were lazily loaded within the transaction, what do we do with elements that had been "expired" and reloaded within the trans, etc. The fact is that if you've just rolled back a transaction, in a concurrent environment you now have no idea whats in the database or the "true" state of your objects, unless you go back and re-fetch. The attribute rollback feature also adds a little bit of bookkeeping overhead and of course more complexity to the source code. So for all these reasons, the "attribute rollback" feature of SA remains in a dev branch. Since expiry works so well we've decided to KISS. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---