summaryrefslogtreecommitdiff
path: root/doc/build/orm/tutorial.rst
diff options
context:
space:
mode:
Diffstat (limited to 'doc/build/orm/tutorial.rst')
-rw-r--r--doc/build/orm/tutorial.rst27
1 files changed, 15 insertions, 12 deletions
diff --git a/doc/build/orm/tutorial.rst b/doc/build/orm/tutorial.rst
index 32d75194a..aa9a51178 100644
--- a/doc/build/orm/tutorial.rst
+++ b/doc/build/orm/tutorial.rst
@@ -406,7 +406,7 @@ We can add more ``User`` objects at once using
... User(name='mary', fullname='Mary Contrary', password='xxg527'),
... User(name='fred', fullname='Fred Flinstone', password='blah')])
-Also, Ed has already decided his password isn't too secure, so lets change it:
+Also, we've decided the password for Ed isn't too secure, so lets change it:
.. sourcecode:: python+sql
@@ -1263,9 +1263,10 @@ using any SQL:
>>> jack.addresses[1].user
<User(name='jack', fullname='Jack Bean', password='gjffdd')>
-Let's add and commit ``Jack Bean`` to the database. ``jack`` as well as the
-two ``Address`` members in his ``addresses`` collection are both added to the
-session at once, using a process known as **cascading**:
+Let's add and commit ``Jack Bean`` to the database. ``jack`` as well
+as the two ``Address`` members in the corresponding ``addresses``
+collection are both added to the session at once, using a process
+known as **cascading**:
.. sourcecode:: python+sql
@@ -1865,8 +1866,8 @@ including the cascade configuration (we'll leave the constructor out too)::
... return "<User(name='%s', fullname='%s', password'%s')>" % (
... self.name, self.fullname, self.password)
-Then we recreate ``Address``, noting that in this case we've created the ``Address.user`` relationship
-via the ``User`` class already::
+Then we recreate ``Address``, noting that in this case we've created
+the ``Address.user`` relationship via the ``User`` class already::
>>> class Address(Base):
... __tablename__ = 'addresses'
@@ -1877,9 +1878,10 @@ via the ``User`` class already::
... def __repr__(self):
... return "<Address(email_address='%s')>" % self.email_address
-Now when we load Jack (below using :meth:`~.Query.get`, which loads by primary key),
-removing an address from his ``addresses`` collection will result in that
-``Address`` being deleted:
+Now when we load the user ``jack`` (below using :meth:`~.Query.get`,
+which loads by primary key), removing an address from the
+corresponding ``addresses`` collection will result in that ``Address``
+being deleted:
.. sourcecode:: python+sql
@@ -1920,7 +1922,8 @@ removing an address from his ``addresses`` collection will result in that
('jack@google.com', 'j25@yahoo.com')
{stop}1
-Deleting Jack will delete both Jack and his remaining ``Address``:
+Deleting Jack will delete both Jack and the remaining ``Address`` associated
+with the user:
.. sourcecode:: python+sql
@@ -2144,8 +2147,8 @@ keyword string 'firstpost'":
('firstpost',)
{stop}[BlogPost("Wendy's Blog Post", 'This is a test', <User(name='wendy', fullname='Wendy Williams', password='foobar')>)]
-If we want to look up just Wendy's posts, we can tell the query to narrow down
-to her as a parent:
+If we want to look up posts owned by the user ``wendy``, we can tell
+the query to narrow down to that ``User`` object as a parent:
.. sourcecode:: python+sql