]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Ensure backrefs accommodate for op_bulk_replace
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 24 Jan 2018 16:09:47 +0000 (11:09 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 25 Jan 2018 01:55:13 +0000 (20:55 -0500)
commit4e2d825c63869a36aa3fbbca4550717a2e48e56f
tree73b16f4bb68801a0988dfef24d35ed17d2cb20c0
parentd41e73c79ceb3b250dca3afcb55f4ac1a1a2fea4
Ensure backrefs accommodate for op_bulk_replace

Fixed 1.2 regression regarding new bulk_replace event
where a backref would fail to remove an object from the
previous owner when a bulk-assignment assigned the
object to a new owner.

As this revisits the Event tokens associated with
AttributeImpl objects, remove the verbosity of the
"inline lazy init" pattern; the Event token is a simple
slotted object and should have minimal memory overhead.

Change-Id: Id188b4026fc2f3500186548008f4db8cdf7afecc
Fixes: #4171
doc/build/changelog/unreleased_12/4171.rst [new file with mode: 0644]
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/dynamic.py
test/orm/test_backref_mutations.py