]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add bulk_replace to AssociationSet, AssociationDict
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 3 Feb 2019 18:29:06 +0000 (13:29 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 4 Feb 2019 15:34:25 +0000 (10:34 -0500)
commit11845453d76e1576f637161e660160f0a6117af6
tree46365ae7f40789150ce358689e972fd1d54191c7
parent025cf864419051de63f8c86c39a87c05ddbd8a65
Add bulk_replace to AssociationSet, AssociationDict

Implemented a more comprehensive assignment operation (e.g. "bulk replace")
when using association proxy with sets or dictionaries.  Fixes the problem
of redundant proxy objects being created to replace the old ones, which
leads to excessive events and SQL and in the case of unique constraints
will cause the flush to fail.

Fixes: #2642
Change-Id: I57ab27dd9feba057e539267722cce92254fca777
doc/build/changelog/migration_13.rst
doc/build/changelog/unreleased_13/2642.rst [new file with mode: 0644]
lib/sqlalchemy/ext/associationproxy.py
test/ext/test_associationproxy.py