]> 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:47:02 +0000 (12:47 -0400)
commit192d3ecfdc712bd1b60adabb54ba48abb6dd2646
tree5b216a9a0990299273214abe74de5fb9879eca3f
parent3c7bc0f9d793f9e185ea1d9c3f4e56f8654acc0d
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
(cherry picked from commit 23a1c60982dc4799c76f0cec276a3bae8a24395b)
doc/build/changelog/unreleased_13/4647.rst [new file with mode: 0644]
lib/sqlalchemy/orm/session.py
test/orm/test_merge.py