]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Unwrap Proxy objects when scanning declared_attr
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 23 Aug 2018 16:40:26 +0000 (12:40 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 23 Aug 2018 16:47:08 +0000 (12:47 -0400)
commit626356842d77d4ec6427b3bfc04bdff93d24d246
tree2f9fbf98d73f3647f814940b9d2116d022052ee8
parent469931514a1517dde82ba56f780c3007c66d5943
Unwrap Proxy objects when scanning declared_attr

Fixed bug where the declarative scan for attributes would receive the
expression proxy delivered by a hybrid attribute at the class level, and
not the hybrid attribute itself, when receiving the descriptor via the
``@declared_attr`` callable on a subclass of an already-mapped class. This
would lead to an attribute that did not report itself as a hybrid when
viewed within :attr:`.Mapper.all_orm_descriptors`.

Fixes: #4326
Change-Id: I582d03f05c3768b3344f93e3791240e9e69b9d1e
doc/build/changelog/unreleased_12/4326.rst [new file with mode: 0644]
lib/sqlalchemy/ext/declarative/base.py
lib/sqlalchemy/orm/attributes.py
lib/sqlalchemy/orm/base.py
lib/sqlalchemy/orm/descriptor_props.py
test/ext/declarative/test_mixin.py