Just to add to Michael's reply -- keep in mind that how you handle the 
session (commit/rollback/close) will impact the state of any objects the 
session loaded if you're using the ORM and that can have implications in 
your app.

The default behavior of sessions is to have `expire_on_commit=True` - so if 
there are any writes and you `commit`, that will force a database resync 
when you access the data again.  If you didn't eagerload necessary data, 
accessing unloaded attributes after a `commit` will again lock tables in 
the new transaction.  If you call `close` instead of commit, the object 
state will become detached from the session and unloaded attributes will 
raise an error (unless you merge the object into a new session).

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to