diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-06-07 14:50:22 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-06-07 14:50:22 -0400 |
| commit | 4bd3cf69b2a7f5b1977e7be2b8588fd5d3424d11 (patch) | |
| tree | a11f2de5ea35e1b52a3e9b4d53dbbbe8a003cf38 /lib | |
| parent | 80eae2055fa26efb74c26af08af5e9b3c51f6063 (diff) | |
| download | sqlalchemy-4bd3cf69b2a7f5b1977e7be2b8588fd5d3424d11.tar.gz | |
Rework Session transaction FAQs
In preparation for #4712, add an errors.rst code to the Session's
exception about waiting to be rolled back and rework the FAQ entry
to be much more succinct. When this FAQ was first written, I found
it hard to describe why flush worked this way but as the use case is
clearer now, and #4712 actually showed it being confusing when it doesn't
work this way, we can make a simpler and more definitive statement
about this behavior. Additionally, language about "subtransactions"
is minimized as I might be removing or de-emphasizing this concept in
2.0 (though maybe not as it does seem to work well).
Change-Id: I557872aff255b07e14dd843aa024e027a017afb8
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sqlalchemy/orm/session.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/session.py b/lib/sqlalchemy/orm/session.py index cc3361e90..558def854 100644 --- a/lib/sqlalchemy/orm/session.py +++ b/lib/sqlalchemy/orm/session.py @@ -292,7 +292,8 @@ class SessionTransaction(object): " To begin a new transaction with this Session, " "first issue Session.rollback()." " Original exception was: %s" - % self._rollback_exception + % self._rollback_exception, + code="7s2a", ) elif not deactive_ok: raise sa_exc.InvalidRequestError( |
