summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2016-01-20 12:22:17 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2016-01-20 12:22:50 -0500
commit9588b6b244f3de614c8a1eb6242d39805da5b1b8 (patch)
treeec1b5239be533c9e518d3492d4afd89a1ed830ba
parentbd874c12353426c07e0c32950552c6e4090549e0 (diff)
downloadsqlalchemy-9588b6b244f3de614c8a1eb6242d39805da5b1b8.tar.gz
- clarify the "Adding" section also illustrates updates, fixes #2942
(cherry picked from commit 02271efd8976154f855646478b5438db078f7101)
-rw-r--r--doc/build/orm/tutorial.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/build/orm/tutorial.rst b/doc/build/orm/tutorial.rst
index 31579ef3b..29ac4754e 100644
--- a/doc/build/orm/tutorial.rst
+++ b/doc/build/orm/tutorial.rst
@@ -346,8 +346,8 @@ used, it retrieves a connection from a pool of connections maintained by the
session object.
-Adding New Objects
-==================
+Adding and Updating Objects
+===========================
To persist our ``User`` object, we :meth:`~.Session.add` it to our :class:`~sqlalchemy.orm.session.Session`::
@@ -438,7 +438,10 @@ and that three new ``User`` objects are pending:
We tell the :class:`~sqlalchemy.orm.session.Session` that we'd like to issue
all remaining changes to the database and commit the transaction, which has
-been in progress throughout. We do this via :meth:`~.Session.commit`:
+been in progress throughout. We do this via :meth:`~.Session.commit`. The
+:class:`~sqlalchemy.orm.session.Session` emits the ``UPDATE`` statement
+for the password change on "ed", as well as ``INSERT`` statements for the
+three new ``User`` objects we've added:
.. sourcecode:: python+sql