Evidently, when the autoflush occurred within the commit(), the database
transaction COMMIT itself happened before the call to after_update() .
The fact is that explicitly calling session.flush() immediately before
calling session.commit(), changed the final state of the DB.
This means the commit() with autoflush is not equivalent to  flush and then
commit.


On 5/23/08, Michael Bayer <[EMAIL PROTECTED]> wrote:
>
>
>
> On May 23, 2008, at 7:26 AM, Moshe C. wrote:
>
> >
> > PLEASE IGNORE PREVIOUS.
> >
> > It turns out that explicitly flushing does change the order (made a
> > silly coding error before).
> >
> > I am all set, but the question remains why autoflush isn't enough.
>
> autoflush will occur before every query execute and within the
> commit().  the behavior of after_update() is consistent in all cases.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to