]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
add optional proxy_class to track w/ proxy_key
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 28 Apr 2021 13:56:15 +0000 (09:56 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 28 Apr 2021 17:39:59 +0000 (13:39 -0400)
commit41ac0c7187daed54b0ba44b2287b6679d95d2caa
treed0a262379c26aadf0dc2a333b4d863e127ae6928
parent2af1b107fce34b15898e6f534097ad34cfd7d503
add optional proxy_class to track w/ proxy_key

Fixed regression in ORM where using hybrid property to indicate an
expression from a different entity would confuse the column-labeling logic
in the ORM and attempt to derive the name of the hybrid from that other
class, leading to an attribute error. The owning class of the hybrid
attribute is now tracked along with the name.

Fixes: #6386
Change-Id: Ica9497ea34fef799d6265de44104c1f3f3b30232
doc/build/changelog/unreleased_14/6386.rst [new file with mode: 0644]
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/context.py
test/ext/test_hybrid.py
test/orm/test_utils.py