]> 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:15 +0000 (13:58 -0400)
commit597f4a2032f1c6d463c5dca55c7db7d707dabcb1
treeedde9b1f7ff96212fbd3509932be8069e241df6d
parent18bbd3396c3681c641ac5693e5471abf68cfa84c
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
(cherry picked from commit c785a528ea200a8905d1b5d7ab4088d501606d2b)
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