]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
clear new Query._memoized_select_entities in _from_selectable
authorMike Bayer <mike_mp@zzzcomputing.com>
Wed, 30 Jun 2021 20:04:07 +0000 (16:04 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Wed, 30 Jun 2021 20:05:34 +0000 (16:05 -0400)
commit7ed6aee2750d6ceaadc429087e2314962808180a
treea640b63f4afbf3565c15359e8a5b778222c3317b
parentb01a415a6d2b9ef563fc085fcba93f440c686af1
clear new Query._memoized_select_entities in _from_selectable

Fixed regression caused in 1.4.19 due to #6503 and related involving
:meth:`_orm.Query.with_entities` where the new structure used would be
inappropriately transferred to an enclosing :class:`_orm.Query` when making
use of set operations such as :meth:`_orm.Query.union`, causing the JOIN
instructions within to be applied to the outside query as well.

Fixes: #6698
Change-Id: Ia9f294215ebc01330d142a0a3e5be9d02be9380f
doc/build/changelog/unreleased_14/6698.rst [new file with mode: 0644]
lib/sqlalchemy/orm/query.py
test/orm/test_joins.py
test/sql/test_select.py