summaryrefslogtreecommitdiff
path: root/django/db/models/query_utils.py
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2023-04-21 23:10:15 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-04-24 08:32:49 +0200
commit83c9765f45e4622e4a5af3adcd92263a28b13624 (patch)
tree5a04874efd06b5e6a12a5c95ef9c5e4bbc2300e5 /django/db/models/query_utils.py
parent1a13161eab2d040990734f80b3eedea354f6a4ba (diff)
downloaddjango-83c9765f45e4622e4a5af3adcd92263a28b13624.tar.gz
Refs #33766 -- Removed sql.Query.build_filtered_relation_q().
It was a copy of sql.Query._add_q that avoided JOIN updates.
Diffstat (limited to 'django/db/models/query_utils.py')
-rw-r--r--django/db/models/query_utils.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py
index 52b472d252..78148f76b0 100644
--- a/django/db/models/query_utils.py
+++ b/django/db/models/query_utils.py
@@ -433,9 +433,13 @@ class FilteredRelation:
def resolve_expression(self, query, reuse, *args, **kwargs):
clone = self.clone()
- clone.resolved_condition = query.build_filtered_relation_q(
- self.condition, reuse=reuse
- )
+ clone.resolved_condition = query.build_filter(
+ self.condition,
+ can_reuse=reuse,
+ allow_joins=True,
+ split_subq=False,
+ update_join_types=False,
+ )[0]
return clone
def as_sql(self, compiler, connection):