On Sep 8, 2011, at 6:00 PM, Vlad K. wrote: > > Yes that's how I know the order of events. I just checked the logs again and > put some sleep() between update() and merge(). It appears that the update() > does some kind of implicit flush because that "commits" the dirtied > properties of the row instance BEFORE the update is issued, so that when > merge() comes, everything appears in sync to the session.
that's autoflush, which is part of the update() (earlier you said the merge() was taking effect before the update()). Its a little strange to change an attribute on an object that dirties it for update, then manually do an update() that affects the same object - is it the same attribute you're trying to update there ? Anyway, turn off autoflush. Here's some recipes to do that as needed: http://www.sqlalchemy.org/trac/wiki/UsageRecipes/DisableAutoflush -- 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.