Django

Code

Show
Ignore:
Timestamp:
10/10/08 12:15:58 (1 month ago)
Author:
ikelly
Message:

Fixed .distinct() not working with slicing in Oracle, due to the
row numbers necessarily being distinct.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/regressiontests/queries/models.py

    r9206 r9221  
    334334>>> Item.objects.filter(tags__in=[t1, t2]).filter(tags=t3) 
    335335[<Item: two>] 
     336 
     337Make sure .distinct() works with slicing (this was broken in Oracle). 
     338>>> Item.objects.filter(tags__in=[t1, t2]).order_by('name')[:3] 
     339[<Item: one>, <Item: one>, <Item: two>] 
     340>>> Item.objects.filter(tags__in=[t1, t2]).distinct().order_by('name')[:3] 
     341[<Item: one>, <Item: two>] 
    336342 
    337343Bug #2080, #3592