Ticket #10352: 10352-test.diff
File 10352-test.diff, 652 bytes (added by , 16 years ago) |
---|
-
tests/regressiontests/queries/models.py
1044 1044 >>> Annotation.objects.filter(notes__in=Note.objects.filter(note="n1").values_list('note').values('id')) 1045 1045 [<Annotation: a1>] 1046 1046 1047 Bug #10352: Query.as_sql() breaks annotations 1048 >>> from django.db.models import Count 1049 >>> test = Item.objects.annotate(cnt=Count("id")) 1050 >>> test.as_sql() 1051 >>> test[0].cnt 1052 1 1053 1047 1054 """} 1048 1055 1049 1056 # In Python 2.3 and the Python 2.6 beta releases, exceptions raised in __len__