Django

Code

Show
Ignore:
Timestamp:
04/25/08 12:08:28 (9 months ago)
Author:
mtredinnick
Message:

queryset-refactor: Fixed some bugs in the multi-valued filtering behaviour
introduced in [7317]. It was failing in a couple of different ways on some
complex Q() combinations.

Fixed #7047

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/queryset-refactor/tests/regressiontests/queries/models.py

    r7455 r7462  
    219219>>> Item.objects.filter(Q(tags=t1)).filter(Q(tags=t2)) 
    220220[<Item: one>] 
     221>>> Item.objects.filter(Q(tags=t1)).filter(Q(creator__name='fred')|Q(tags=t2)) 
     222[<Item: one>] 
    221223 
    222224Each filter call is processed "at once" against a single table, so this is 
     
    224226things at once (rather than two tags). 
    225227>>> Item.objects.filter(Q(tags=t1) & Q(tags=t2)) 
     228[] 
     229>>> Item.objects.filter(Q(tags=t1), Q(creator__name='fred')|Q(tags=t2)) 
    226230[] 
    227231