summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2015-12-14 17:39:50 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2015-12-14 17:39:50 -0500
commit26ed90ab22dde7bdafe933cb1d16acfe70c1ab78 (patch)
tree33d03a5db4eeb1597b5b67316c71980f6e1da169 /lib/sqlalchemy/orm
parent0e4c4d7efc08d04c3c0ae960428b08ada37e4a91 (diff)
downloadsqlalchemy-26ed90ab22dde7bdafe933cb1d16acfe70c1ab78.tar.gz
- Fixed bug where :meth:`.Session.bulk_update_mappings` and related
would not bump a version id counter when in use. The experience here is still a little rough as the original version id is required in the given dictionaries and there's not clean error reporting on that yet. fixes #3610
Diffstat (limited to 'lib/sqlalchemy/orm')
-rw-r--r--lib/sqlalchemy/orm/persistence.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/sqlalchemy/orm/persistence.py b/lib/sqlalchemy/orm/persistence.py
index 88c96e94c..77c513aef 100644
--- a/lib/sqlalchemy/orm/persistence.py
+++ b/lib/sqlalchemy/orm/persistence.py
@@ -492,7 +492,7 @@ def _collect_update_commands(
col = mapper.version_id_col
params[col._label] = update_version_id
- if col.key not in params and \
+ if (bulk or col.key not in params) and \
mapper.version_id_generator is not False:
val = mapper.version_id_generator(update_version_id)
params[col.key] = val