]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
limit joinedload exclusion rules to immediate mapped columns
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 13 May 2023 16:32:31 +0000 (12:32 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 14 May 2023 13:50:45 +0000 (09:50 -0400)
commit9f7c97b40b6b6c738bd4cac7ae8bdc8803a88973
treea7c75bcc21059b4f6389b373d039f4435b6411fa
parenteb286c15f096771dbb128acbe8fe03e94aa72f6a
limit joinedload exclusion rules to immediate mapped columns

Fixed issue where using additional relationship criteria with the
:func:`_orm.joinedload` loader option, where the additional criteria itself
contained correlated subqueries that referred to the joined entities and
therefore also required "adaption" to aliased entities, would be excluded
from this adaption, producing the wrong ON clause for the joinedload.

Fixes: #9779
Change-Id: Idcfec3e760057fbf6a09c10ad67a0bb4bf70f03a
doc/build/changelog/unreleased_20/9779.rst [new file with mode: 0644]
lib/sqlalchemy/orm/relationships.py
lib/sqlalchemy/sql/annotation.py
lib/sqlalchemy/sql/util.py
test/orm/inheritance/test_assorted_poly.py