]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
use annotated entity when adding secondary
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 29 Mar 2022 13:48:24 +0000 (09:48 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 29 Mar 2022 14:07:30 +0000 (10:07 -0400)
commita55476fbdbc9b4e192a052b81dfe7e750d6241e4
tree7dc6802b398cfeb8e31e3d0dd1d10ba4dd40edfb
parent4fd4e4b0d6d20586614a18c3365476184d1a6a70
use annotated entity when adding secondary

Fixed regression in "dynamic" loader strategy where the
:meth:`_orm.Query.filter_by` method would not be given an appropriate
entity to filter from, in the case where a "secondary" table were present
in the relationship being queried and the mapping were against something
complex such as a "with polymorphic".

Fixes: #7868
Change-Id: I3b82eec6485c5a92b56a596da0cfb009e9e67883
doc/build/changelog/unreleased_14/7868.rst [new file with mode: 0644]
lib/sqlalchemy/orm/dynamic.py
test/orm/test_dynamic.py