]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Ensure select_from_entity adapter is used in adjust_for_single_inheritance
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 19 Apr 2018 21:07:32 +0000 (17:07 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 19 Apr 2018 21:11:47 +0000 (17:11 -0400)
commit4f2d0913fe4fe4f5182f85903a6b3be65ac4fd94
tree23fc97a6378b880a5d58669bd8bae18914960a81
parenta3473c08d35e2cce32b014519df5f774c0166cf1
Ensure select_from_entity adapter is used in adjust_for_single_inheritance

Fixed issue in single-inheritance loading where the use of an aliased
entity against a single-inheritance subclass in conjunction with the
:meth:`.Query.select_from` method would cause the SQL to be rendered with
the unaliased table mixed in to the query, causing a cartesian product.  In
particular this was affecting the new "selectin" loader when used against a
single-inheritance subclass.

Change-Id: Ic2cbe94a5269c101b1f98da9a466180dd4452783
Fixes: #4241
doc/build/changelog/unreleased_12/4241.rst [new file with mode: 0644]
lib/sqlalchemy/orm/query.py
test/orm/inheritance/test_single.py
test/orm/test_selectin_relations.py