summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Kelly <ian.g.kelly@gmail.com>2008-10-10 17:15:58 +0000
committerIan Kelly <ian.g.kelly@gmail.com>2008-10-10 17:15:58 +0000
commit9a72913edd10dbf2214397b20c3f5f501afd506b (patch)
treed9c4215685755d2864367ceade8eced20e6631ce /tests
parent227a5a4ee62acb6afbd77d1bbcf1d534d8a05c49 (diff)
Fixed .distinct() not working with slicing in Oracle, due to the
row numbers necessarily being distinct. git-svn-id: http://code.djangoproject.com/svn/django/trunk@9221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
-rw-r--r--tests/regressiontests/queries/models.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/regressiontests/queries/models.py b/tests/regressiontests/queries/models.py
index fc21cef3cc..f3831df5b6 100644
--- a/tests/regressiontests/queries/models.py
+++ b/tests/regressiontests/queries/models.py
@@ -334,6 +334,12 @@ Bug #4464
>>> Item.objects.filter(tags__in=[t1, t2]).filter(tags=t3)
[<Item: two>]
+Make sure .distinct() works with slicing (this was broken in Oracle).
+>>> Item.objects.filter(tags__in=[t1, t2]).order_by('name')[:3]
+[<Item: one>, <Item: one>, <Item: two>]
+>>> Item.objects.filter(tags__in=[t1, t2]).distinct().order_by('name')[:3]
+[<Item: one>, <Item: two>]
+
Bug #2080, #3592
>>> Author.objects.filter(item__name='one') | Author.objects.filter(name='a3')
[<Author: a1>, <Author: a3>]