]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Warn on merge of already-pending object
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 28 Apr 2019 16:40:31 +0000 (12:40 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 28 Apr 2019 16:44:00 +0000 (12:44 -0400)
commit23a1c60982dc4799c76f0cec276a3bae8a24395b
treea5e32ecc74a8d40ae4dd8049ef955bf9dbda9b68
parent2f55c844051d9fe8865576bd77107e94c6de16c1
Warn on merge of already-pending object

A warning is now emitted for the case where a transient object is being
merged into the session with :meth:`.Session.merge` when that object is
already transient in the :class:`.Session`.   This warns for the case where
the object would normally be double-inserted.

Fixes: #4647
Change-Id: Ie5223a59a2856664bf283017e962caf8c4230536
doc/build/changelog/unreleased_13/4647.rst [new file with mode: 0644]
lib/sqlalchemy/orm/session.py
test/orm/test_merge.py