]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Call proxied collection before invoking creator in associationlist.append()
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 27 Apr 2017 15:24:41 +0000 (11:24 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 28 Apr 2017 14:14:09 +0000 (10:14 -0400)
commit36275b0c2d8d3501bc0023e80d8433c0d54c0d9a
treeb558f1d4df1daf6854d013abf13c0200b5c68cd4
parentcedb11925fc7dd652f479370b59c38324e0e3951
Call proxied collection before invoking creator in associationlist.append()

Improved the association proxy list collection so that premature
autoflush against a newly created association object can be prevented
in the case where ``list.append()`` is being used, and a lazy load
would be invoked when the association proxy accesses the endpoint
collection.  The endpoint collection is now accessed first before
the creator is invoked to produce the association object.

Change-Id: I008a6dbdfe5b1c0dfd02189c3d954d83a65f3fc5
Fixes: #3941
doc/build/changelog/changelog_12.rst
lib/sqlalchemy/ext/associationproxy.py
test/ext/test_associationproxy.py