]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Accommodate for base class when adjusting path for with_polymorphic
authorMike Bayer <mike_mp@zzzcomputing.com>
Tue, 28 Jan 2020 17:34:06 +0000 (12:34 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Tue, 28 Jan 2020 17:47:44 +0000 (12:47 -0500)
commit635ee0d005039ccb0d8e8b98acbec6a885d7f54a
treef1147c34345f467e00dd77a4f61132e2d1b80e81
parent9b71ade9185fe84b447ed805490718f0ef6061b2
Accommodate for base class when adjusting path for with_polymorphic

Fixed an additional regression in the same area as that of :ticket:`5080`
introduced in 1.3.0b3 via :ticket:`4468` where the ability to create a
joined option across a :func:`.with_polymorphic` into a relationship
against the base class of that with_polymorphic, and then further into
regular mapped relationships would fail as the base class component would
not add itself to the load path in a way that could be located by the
loader strategy. The changes applied in :ticket:`5080` have been further
refined to also accommodate this scenario.

Fixes: #5121
Change-Id: I9753dbbcb7b7640c995ad983a6d04b36fa18cf54
(cherry picked from commit c9406e58a4fd2de4bb2fd53530e04cc9fc786cbf)
doc/build/changelog/unreleased_13/5121.rst [new file with mode: 0644]
lib/sqlalchemy/orm/path_registry.py
test/orm/inheritance/test_relationship.py
test/orm/test_utils.py