]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Consider merge key with (None, ) as non-persistent
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 31 Aug 2017 19:46:53 +0000 (15:46 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 31 Aug 2017 21:21:35 +0000 (17:21 -0400)
commit3feea4503ff211cdd1f6046b4b8ae16cf0dd08a3
treedfe1746528dc81c84b2e00936625de9fe687ecdc
parent2efd89d02941ab4267d6e2842963fd38b1539f6c
Consider merge key with (None, ) as non-persistent

Fixed bug in :meth:`.Session.merge` where objects in a collection that had
the primary key attribute set to ``None`` for a key that is  typically
autoincrementing would be considered to be a database-persisted key for
part of the internal deduplication process, causing only one object to
actually be inserted in the database.

Change-Id: I0a6e00043be0b2979cda33740e1be3b430ecf8c7
Fixes: #4056
(cherry picked from commit 5243341ed886e10a0d3f7fef8ae3d071e0ffdcf0)
doc/build/changelog/unreleased_11/4056.rst [new file with mode: 0644]
lib/sqlalchemy/orm/session.py
test/orm/test_merge.py