]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Consult is_attrbute flag to determine descriptor; enable for assoc proxy
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 15 Jun 2019 02:44:59 +0000 (22:44 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 15 Jun 2019 02:47:01 +0000 (22:47 -0400)
commitb927836a33ea0dcfd8290e09e1ec5d3833e36df9
tree7b43afa8fba4d31effe5b1e662275e1812d1205c
parent61a741351433453b8b0a38dcf8dc57b8092fdc60
Consult is_attrbute flag to determine descriptor; enable for assoc proxy

Fixed bug where the :attr:`.Mapper.all_orm_descriptors` accessor would
return an entry for the :class:`.Mapper` itself under the declarative
``__mapper___`` key, when this is not a descriptor.  The ``.is_attribute``
flag that's present on all :class:`.InspectionAttr` objects is now
consulted, which has also been modified to be ``True`` for an association
proxy, as it was erroneously set to False for this object.

Fixes: #4729
Change-Id: Ia02388cc25d004e32d337140b62a587f3e5a0b7b
(cherry picked from commit 79d07c9abc7d4d3abb6bf2ca5ca66e87d3a11f08)
doc/build/changelog/unreleased_13/4729.rst [new file with mode: 0644]
lib/sqlalchemy/ext/associationproxy.py
lib/sqlalchemy/orm/instrumentation.py
test/ext/declarative/test_basic.py
test/orm/test_inspect.py