diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-10-11 00:26:11 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-10-11 00:26:11 +0000 |
| commit | 909371e5e57ec340c1f9b65fb5124802bc43f5f9 (patch) | |
| tree | 06a3086ab1fd93d7cb2789cb543fedcab7dc1f23 /tests | |
| parent | 6cfbd52138488f135329dd77cd596a0dd982fdeb (diff) | |
[1.0.X] Fixed .distinct() not working with slicing in Oracle, due to the
row numbers necessarily being distinct.
Backport of r9221 from trunk (since Ian doesn't have commit privileges at the
moment).
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9228 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/queries/models.py | 6 |
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>] |
