]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
implement _post_inspect for AliasedInsp
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 20 May 2026 19:59:10 +0000 (15:59 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 20 May 2026 20:30:28 +0000 (16:30 -0400)
commitafa94c32a91711b81e4e663cc328837354491315
tree4435fbf3cca9867a1f597062209fcbff0716fe06
parent56edb237cb652bed221a377cdc2ae2b7b835dd61
implement _post_inspect for AliasedInsp

Fixed issue where using :func:`_orm.with_polymorphic` on a leaf class (a
subclass with no further descendants) or a non-inherited class would fail
with an ``AttributeError`` when used in an ORM statement, due to
:func:`_orm.configure_mappers` not being triggered implicitly. The fix
ensures that :class:`.AliasedInsp` participates in the ``_post_inspect``
hook, triggering mapper configuration during ORM statement compilation.

Fixes: #13319
Change-Id: Ic5910474676be41f8c815dc72c38fca8e20cdeb9
doc/build/changelog/unreleased_20/13319.rst [new file with mode: 0644]
lib/sqlalchemy/orm/util.py
test/orm/test_utils.py