add "transactional=True", "autorefresh=True" flags to Session; remove SessionTransaction from main docs

Issue #644 resolved
Mike Bayer repo owner created an issue

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)

  1. Mike Bayer reporter

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

  2. Log in to comment