Hi,

In my application whenever I issue a rollback on 'sub-transaction' I see (using logging.debug) that my main list is being reloaded from the database.

In other words I do things like this:

- get application wide db session
- load the list of all the drinks
- begin_nested
- create/edit e.g. purchase item of one drink
- commit
- begin_nested
- create/edit another purchase item of the same drink as above
- rollback
- commit (to finally commit first purchase)

At this point all the drinks with all the relations etc are reloaded from the database.

I tried with expire_on_commit but it doesn't seem to affect rollback.

Is there way to suppress the reloading of all the items and only load the one affected by the changes by using expire(instance) or refresh(instance)?

Werner

--
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 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to