]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Break association proxy into a descriptor + per-class accessor
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 27 Feb 2018 18:15:10 +0000 (13:15 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 27 Sep 2018 21:09:28 +0000 (17:09 -0400)
commit6446e0dfd3e3bb60754bad81c4d52345733d94e3
tree217e2183a984170c15db799baa3f79dda0da379d
parentd945ee87a1934cb689066e4683ba9531d803f9ad
Break association proxy into a descriptor + per-class accessor

Reworked :class:`.AssociationProxy` to store state that's specific to a
parent class in a separate object, so that a single
:class:`.AssocationProxy` can serve for multiple parent classes, as is
intrinsic to inheritance, without any ambiguity in the state returned by it.
A new method :meth:`.AssociationProxy.for_class` is added to allow
inspection of class-specific state.

Change-Id: I634f88aae6306ac5c5237a0e1acbe07d0481d6b6
Fixes: #3423
doc/build/changelog/migration_13.rst
doc/build/changelog/unreleased_13/3423.rst [new file with mode: 0644]
doc/build/orm/extensions/associationproxy.rst
lib/sqlalchemy/ext/associationproxy.py
lib/sqlalchemy/orm/instrumentation.py
test/ext/test_associationproxy.py
test/orm/test_inspect.py