summaryrefslogtreecommitdiff
path: root/django/db/models/sql/constants.py
diff options
context:
space:
mode:
authorAnssi Kääriäinen <akaariai@gmail.com>2012-12-20 21:25:48 +0200
committerAnssi Kääriäinen <akaariai@gmail.com>2012-12-20 21:27:00 +0200
commit3dcd435a0eb4380a3846e9c65140df480975687e (patch)
tree95f6d265f68af8f8bd579e466d9471875ea8fef6 /django/db/models/sql/constants.py
parentc04c03daa3620dc5106740a976738ada35203ab5 (diff)
Fixed #19500 -- Solved a regression in join reuse
The ORM didn't reuse joins for direct foreign key traversals when using chained filters. For example: qs.filter(fk__somefield=1).filter(fk__somefield=2)) produced two joins. As a bonus, reverse onetoone filters can now reuse joins correctly The regression was caused by the join() method refactor in commit 68847135bc9acb2c51c2d36797d0a85395f0cd35 Thanks for Simon Charette for spotting some issues with the first draft of the patch.
Diffstat (limited to 'django/db/models/sql/constants.py')
-rw-r--r--django/db/models/sql/constants.py3
1 files changed, 0 insertions, 3 deletions
diff --git a/django/db/models/sql/constants.py b/django/db/models/sql/constants.py
index 1c34f70169..9f82f426ed 100644
--- a/django/db/models/sql/constants.py
+++ b/django/db/models/sql/constants.py
@@ -44,6 +44,3 @@ ORDER_DIR = {
'ASC': ('ASC', 'DESC'),
'DESC': ('DESC', 'ASC'),
}
-
-# A marker for join-reusability.
-REUSE_ALL = object()