]> 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 20:23:42 +0000 (16:23 -0400)
commit5243341ed886e10a0d3f7fef8ae3d071e0ffdcf0
treeeb8e7f052e6131ef43a8c309d3a787446b9bf5d5
parent89fab2824b681073d1e51198b9dd625e9aa5fbed
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
doc/build/changelog/unreleased_11/4056.rst [new file with mode: 0644]
lib/sqlalchemy/orm/session.py
test/orm/test_merge.py