]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Adapt single inh criteria more specifically
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 18 Jan 2019 01:08:10 +0000 (20:08 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 18 Jan 2019 04:15:04 +0000 (23:15 -0500)
commit6256b40d3f0699720d44fc6e4866ca00191f0851
treedf11a13ab06b128b0d9e9ab10337ac3adf6f0cb8
parent483b0fdf892f99d501b74fd4086dee9addd9df29
Adapt single inh criteria more specifically

Fixed issue where when using single-table inheritance in conjunction with a
joined inheritance hierarchy that uses "with polymorphic" loading, the
"single table criteria" for that single-table entity could get confused for
that of other entities from the same hierarchy used in the same query.The
adaption of the "single table criteria" is made more specific to the target
entity to avoid it accidentally getting adapted to other tables in the
query.

Change-Id: Ia9f915a4b01e8bb9cee365c4c70e00c626f103c4
Fixes: #4454
(cherry picked from commit c8d7141c79829f36e123bf3e4be1721dd34aaeb4)
doc/build/changelog/unreleased_12/4454.rst [new file with mode: 0644]
lib/sqlalchemy/orm/mapper.py
lib/sqlalchemy/orm/query.py
test/orm/inheritance/test_single.py