]> 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:14:24 +0000 (23:14 -0500)
commitc8d7141c79829f36e123bf3e4be1721dd34aaeb4
treea3e985be4eb5a73f52f18e1c254831da516ca38b
parent0717ce9d1dc28b67b4568351f4e98e59a831b1f1
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
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