]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Set use_mapper_path=True for with_poly subentities
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 7 Jan 2020 02:06:10 +0000 (21:06 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 7 Jan 2020 15:50:09 +0000 (10:50 -0500)
commit0b9283149d57ac44e7efe63fe06e0eebd57c0425
tree3ccb51a323fddaa9bdcba7f611afcdd385375aaf
parentdb211c4820db4876cd421c23c03a7a1bf773573e
Set use_mapper_path=True for with_poly subentities

Fixed regression in joined eager loading introduced in 1.3.0b3 via
:ticket:`4468` where the ability to create a joined option across a
:func:`.with_polymorphic` into a polymorphic subclass using
:meth:`.RelationshipProperty.of_type` and then further along regular mapped
relationships would fail as the polymorphic subclass would not add itself
to the load path in a way that could be located by the loader strategy.  A
tweak has been made to resolve this scenario.

Fixes: #5082
Change-Id: I1c7b8d70ed94436c655e433bf34394b13d384c35
(cherry picked from commit 2734439fff953a7bb8aecdedb5f851441b5122e9)
doc/build/changelog/unreleased_13/5082.rst [new file with mode: 0644]
lib/sqlalchemy/orm/path_registry.py
lib/sqlalchemy/orm/strategy_options.py
lib/sqlalchemy/orm/util.py
test/orm/inheritance/test_relationship.py
test/orm/test_utils.py