On Oct 2, 2012, at 2:14 PM, Mark Friedenbach wrote: > SQLAlchemy 0.7.9 seems to have broken SQLAlchemy-ORM-tree > (http://pypi.python.org/pypi/SQLAlchemy-ORM-tree/). Specifically, > SQLAlchemy-ORM-Tree has a dependency on flush behavior prior to the fix for > #2566. I'm currently investigating a way to detect (and ignore) the 2nd flush. > > But more generally I'm wondering what motivated #2566 in the first place? It > has huge compatibility implications for anyone doing tricky things with flush > and insert/update/delete events.
#2566 was a serious issue. If dirty state remains in the session after a flush(), then calling commit() had the effect that *two COMMITs are emitted*, meaning, one COMMIT, then a brand new transaction, then another one, and then any dirty state left by that second commit would just be garbage. The commit() call flushes all remaining dirty state and it is essential that the session is clean after a commit occurs. 2566's fix should only effect when commit() is called. Feel free to send me a test case showing a valid usage that is broken by this change. -- 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.