summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/orm/context.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-10-22 12:31:06 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-10-22 12:36:42 -0400
commit0fff45036d2629caf41c771088866beb61e5b284 (patch)
treeebb376315646196ec053198bef6ff2b834337712 /lib/sqlalchemy/orm/context.py
parentee340d17ea45b25c063d7bfca999b7b8031ff0fe (diff)
downloadsqlalchemy-0fff45036d2629caf41c771088866beb61e5b284.tar.gz
use correct entity in path for aliased class relationship
Fixed bug in "relationship to aliased class" feature introduced at :ref:`relationship_aliased_class` where it was not possible to create a loader strategy option targeting an attribute on the target using the :func:`_orm.aliased` construct directly in a second loader option, such as ``selectinload(A.aliased_bs).joinedload(aliased_b.cs)``, without explicitly qualifying using :meth:`_orm.PropComparator.of_type` on the preceding element of the path. Additionally, targeting the non-aliased class directly would be accepted (inappropriately), but would silently fail, such as ``selectinload(A.aliased_bs).joinedload(B.cs)``; this now raises an error referring to the typing mismatch. Fixes: #7224 Change-Id: I40857c7275667dcb64f1d1fd0c8072e48758e678
Diffstat (limited to 'lib/sqlalchemy/orm/context.py')
0 files changed, 0 insertions, 0 deletions