]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
accommodate subclass mapper in post-loader entity_isa check
authorMike Bayer <mike_mp@zzzcomputing.com>
Sun, 29 Mar 2026 17:46:39 +0000 (13:46 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sun, 29 Mar 2026 17:55:54 +0000 (13:55 -0400)
commit51bc261a976b51a5462934cb75a08847c284d087
treebd059aac07115fc44866937352f51c6f735e59df
parent933d52add3b05397b3a00747c923005bf96fbbd5
accommodate subclass mapper in post-loader entity_isa check

Fixed issue where using chained loader options such as
:func:`_orm.selectinload` after :func:`_orm.joinedload` with
:meth:`_orm.PropComparator.of_type` for a polymorphic relationship would
not properly apply the chained loader option. The loader option is now
correctly applied when using a call such as
``joinedload(A.b.of_type(poly)).selectinload(poly.SubClass.c)`` to eagerly
load related objects.

Fixes: #13209
Change-Id: I2d14838f1b1a9a2b18dc52137910dab0bccf0dd5
(cherry picked from commit 2ac8c1a7c71400c1bc13f54f3c05cfd2e3ae1442)
doc/build/changelog/unreleased_20/13209.rst [new file with mode: 0644]
lib/sqlalchemy/orm/strategies.py
test/orm/test_of_type.py