diff options
Diffstat (limited to 'doc/build/tutorial')
| -rw-r--r-- | doc/build/tutorial/orm_data_manipulation.rst | 7 | ||||
| -rw-r--r-- | doc/build/tutorial/orm_related_objects.rst | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/doc/build/tutorial/orm_data_manipulation.rst b/doc/build/tutorial/orm_data_manipulation.rst index b0b67f53c..f6237f4aa 100644 --- a/doc/build/tutorial/orm_data_manipulation.rst +++ b/doc/build/tutorial/orm_data_manipulation.rst @@ -122,10 +122,9 @@ method: >>> session.flush() {opensql}BEGIN (implicit) - INSERT INTO user_account (name, fullname) VALUES (?, ?) - [...] ('squidward', 'Squidward Tentacles') - INSERT INTO user_account (name, fullname) VALUES (?, ?) - [...] ('ehkrabs', 'Eugene H. Krabs') + INSERT INTO user_account (name, fullname) VALUES (?, ?), (?, ?) RETURNING id + [...] ('squidward', 'Squidward Tentacles', 'ehkrabs', 'Eugene H. Krabs') + Above we observe the :class:`_orm.Session` was first called upon to emit SQL, so it created a new transaction and emitted the appropriate INSERT statements diff --git a/doc/build/tutorial/orm_related_objects.rst b/doc/build/tutorial/orm_related_objects.rst index 0df611e45..a6bb2b9a3 100644 --- a/doc/build/tutorial/orm_related_objects.rst +++ b/doc/build/tutorial/orm_related_objects.rst @@ -198,12 +198,11 @@ newly generated primary key of the ``user_account`` row is applied to the >>> session.commit() {opensql}INSERT INTO user_account (name, fullname) VALUES (?, ?) [...] ('pkrabs', 'Pearl Krabs') - INSERT INTO address (email_address, user_id) VALUES (?, ?) - [...] ('pearl.krabs@gmail.com', 6) - INSERT INTO address (email_address, user_id) VALUES (?, ?) - [...] ('pearl@aol.com', 6) + INSERT INTO address (email_address, user_id) VALUES (?, ?), (?, ?) RETURNING id + [...] ('pearl.krabs@gmail.com', 6, 'pearl@aol.com', 6) COMMIT + .. _tutorial_loading_relationships: Loading Relationships |
