Indeed, session.dirty is non-empty within after_flush_postexec().

I'm working on a fix for sqlalchemy-orm-tree first before I can think about
doing a (smaller) regression test. Besides, it now occurs to me that in
some cases I might be setting attributes on objects in the session but
outside of the flush plan (child nodes of a parent that gets moved around,
for example). That could legitimately cause an undesired 2nd
flush. `set_committed_value` looks like what I want to fix that.

On Tue, Oct 2, 2012 at 1:08 PM, Michael Bayer <[email protected]>wrote:

>
> On Oct 2, 2012, at 4:05 PM, Michael Bayer wrote:
>
> >    In theory it would be only .new and .dirty that might have state
> after the flush completes.
>
> correction, ".new and .deleted" lists that might have any state.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sqlalchemy" group.
> To post to this group, send email to [email protected].
> 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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
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.

Reply via email to