]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
see also for session commit, rollback
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 12 Feb 2013 02:10:55 +0000 (21:10 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 12 Feb 2013 02:10:55 +0000 (21:10 -0500)
doc/build/orm/session.rst
lib/sqlalchemy/orm/session.py

index 52119df74d48ba0898cd6512561a9e592a779f44..37314cf4cbf4e653bfcccfda6c6bdc75061d7c2f 100644 (file)
@@ -780,6 +780,8 @@ required after a flush fails, even though the underlying transaction will have
 been rolled back already - this is so that the overall nesting pattern of
 so-called "subtransactions" is consistently maintained.
 
+.. _session_committing:
+
 Committing
 ----------
 
@@ -818,6 +820,8 @@ model to some degree since the :class:`~sqlalchemy.orm.session.Session`
 behaves in exactly the same way with regard to attribute state, except no
 transaction is present.
 
+.. _session_rollback:
+
 Rolling Back
 ------------
 
index 27c84cc4e4422cfd9e0cacb050b4ae7993538cb4..00c6d4227f1e0da6b1baabcbb7bab1bb208159eb 100644 (file)
@@ -655,6 +655,10 @@ class Session(_SessionClassMethods):
         to the first real transaction are closed.  Subtransactions occur when
         begin() is called multiple times.
 
+        .. seealso::
+
+            :ref:`session_rollback`
+
         """
         if self.transaction is None:
             pass
@@ -678,11 +682,16 @@ class Session(_SessionClassMethods):
         multiple times), the subtransaction will be closed, and the next call
         to ``commit()`` will operate on the enclosing transaction.
 
-        For a session configured with autocommit=False, a new transaction will
+        When using the :class:`.Session` in its default mode of
+        ``autocommit=False``, a new transaction will
         be begun immediately after the commit, but note that the newly begun
         transaction does *not* use any connection resources until the first
         SQL is actually emitted.
 
+        .. seealso::
+
+            :ref:`session_committing`
+
         """
         if self.transaction is None:
             if not self.autocommit: