add "transactional=True", "autorefresh=True" flags to Session; remove SessionTransaction from main docs
Issue #644
resolved
lets make transactional Sessions work like this:
sess = create_session(transactional=True)
.... etc...
sess.close() # flushes, commits
as well as
sess = create_session()
sess.begin()
... etc..
sess.commit()
i.e. just remove the need to use SessionTransaction explicitly. begin() still returns the SessionTransaction, create_transaction() is deprecated.
Comments (3)
-
reporter -
reporter - changed status to resolved
-
reporter - removed milestone
Removing milestone: 0.4.0 (automated comment)
- Log in to comment
additionally, "autoflush" just adds a flush() call before each query(). that way, when you query(), whatever is pending gets flushed, and the query can then look for objects which were part of that flush. this would imply "transactional" since its best used within a transaction (or better yet, should require the transactional flag be set).