> > On Feb 11, 9:10 am, Michael Bayer <mike...@zzzcomputing.com> wrote:
> that is absolutely true.  
>
> works in all of our tests.... do you have one to demonstrate ?

Thanks Michael, finally tracked this one down while creating tests
that weren't reproducing the issue.

It didn't dawn on me that the render() function in Tornado also calls
finish(), to which I've added session.remove(). My call to
session.commit() wasn't doing anything because it was after the
render() call, at which point the session was already removed.

With that out of the way, is there any problem with doing this in the
finish() code:

session.commit()
session.remove()

Given that not all handlers will have data to commit ? I guess the
other alternative is to do a commit() before the render function and
set expire_on_commit=False so that the render doesn't reload
pointlessly when the template is rendered.

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