summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2021-06-30 16:04:07 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2021-06-30 16:05:34 -0400
commit7ed6aee2750d6ceaadc429087e2314962808180a (patch)
treea640b63f4afbf3565c15359e8a5b778222c3317b /lib
parentb01a415a6d2b9ef563fc085fcba93f440c686af1 (diff)
downloadsqlalchemy-7ed6aee2750d6ceaadc429087e2314962808180a.tar.gz
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
Diffstat (limited to 'lib')
-rw-r--r--lib/sqlalchemy/orm/query.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sqlalchemy/orm/query.py b/lib/sqlalchemy/orm/query.py
index d8f4b4ea7..a89b86c79 100644
--- a/lib/sqlalchemy/orm/query.py
+++ b/lib/sqlalchemy/orm/query.py
@@ -1359,6 +1359,7 @@ class Query(
"_offset_clause",
"_last_joined_entity",
"_legacy_setup_joins",
+ "_memoized_select_entities",
"_distinct",
"_distinct_on",
"_having_criteria",