diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-12-14 17:24:47 -0500 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2015-12-14 17:30:42 -0500 |
| commit | a6387b0df8693310e0514f714ba9970e4dca6e5d (patch) | |
| tree | c4b56c59d80be6955e2e6cbd00f8cbe65618c5c8 /lib/sqlalchemy/sql/crud.py | |
| parent | cb24a4fcd798b07a858663079f3d25f66fd29268 (diff) | |
| download | sqlalchemy-a6387b0df8693310e0514f714ba9970e4dca6e5d.tar.gz | |
- Fixed bug in :meth:`.Update.return_defaults` which would cause all
insert-default holding columns not otherwise included in the SET
clause (such as primary key cols) to get rendered into the RETURNING
even though this is an UPDATE.
- Major fixes to the :paramref:`.Mapper.eager_defaults` flag, this
flag would not be honored correctly in the case that multiple
UPDATE statements were to be emitted, either as part of a flush
or a bulk update operation. Additionally, RETURNING
would be emitted unnecessarily within update statements.
fixes #3609
(cherry picked from commit 0e4c4d7efc08d04c3c0ae960428b08ada37e4a91)
Diffstat (limited to 'lib/sqlalchemy/sql/crud.py')
| -rw-r--r-- | lib/sqlalchemy/sql/crud.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/sql/crud.py b/lib/sqlalchemy/sql/crud.py index 6080625ad..a64a6479b 100644 --- a/lib/sqlalchemy/sql/crud.py +++ b/lib/sqlalchemy/sql/crud.py @@ -441,6 +441,7 @@ def _append_param_update( else: compiler.postfetch.append(c) elif implicit_return_defaults and \ + stmt._return_defaults is not True and \ c in implicit_return_defaults: compiler.returning.append(c) |
