]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Add QueryableAttribute._impl_uses_objects accessor for AssociationProxy
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 19 May 2019 16:38:14 +0000 (12:38 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 19 May 2019 17:58:01 +0000 (13:58 -0400)
commitc785a528ea200a8905d1b5d7ab4088d501606d2b
tree27bcfe175587c44cb834e38c98f8c539e041ebae
parentf07e050c9ce4afdeb9c0c136dbcc547f7e5ac7b8
Add QueryableAttribute._impl_uses_objects accessor for AssociationProxy

Fixed regression where new association proxy system was still not proxying
hybrid attributes when they made use of the ``@hybrid_property.expression``
decorator to return an alternate SQL expression, or when the hybrid
returned an arbitrary :class:`.PropComparator`, at the expression level.
This involved futher generalization of the heuristics used to detect the
type of object being proxied at the level of :class:`.QueryableAttribute`,
to better detect if the descriptor ultimately serves mapped classes or
column expressions.

Fixes: #4690
Change-Id: I5b5300661291c94a23de53bcf92d747701720aa1
doc/build/changelog/unreleased_13/4690.rst [new file with mode: 0644]
lib/sqlalchemy/ext/associationproxy.py
lib/sqlalchemy/orm/attributes.py
test/ext/test_associationproxy.py