]> 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:45 +0000 (10:07 -0400)
commit02f50ded0b8897ab10f5c5db0336f1f3f68451ef
tree30f6e2df962c4cd577d617649170e9dc17510146
parent6c9fa2dc8667ea5de66023dc7140881befa788da
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
(cherry picked from commit a55476fbdbc9b4e192a052b81dfe7e750d6241e4)
doc/build/changelog/unreleased_14/7868.rst [new file with mode: 0644]
lib/sqlalchemy/orm/dynamic.py
test/orm/test_dynamic.py