Using the Session — SQLAlchemy 0.7 Documentation

Tags:

"(...) en using a Session, it’s important to note that the objects which are associated with it are proxy objects to the transaction being held by the Session - there are a variety of events that will cause objects to re-access the database in order to keep synchronized. It is possible to “detach” objects from a Session, and to continue using them, though this practice has its caveats. It’s intended that usually, you’d re-associate detached objects another Session when you want to work with them again, so that they can resume their normal task of representing database state. (...)"