| 321 | # Regressions for #11293 |
| 322 | >>> from django.db.models import Q,F |
| 323 | >>> Publisher.objects.annotate(rating_sum=Sum('book__rating'), book_count=Count('book')).filter( Q(rating_sum__gt=5.5) | Q(rating_sum__isnull=True)).order_by('pk') |
| 324 | [<Publisher: Apress>, <Publisher: Prentice Hall>, <Publisher: Jonno's House of Books>] |
| 325 | >>> Publisher.objects.annotate(rating_sum=Sum('book__rating'), book_count=Count('book')).filter( Q(pk__lt=F('book_count')) | Q(rating_sum=None), name__contains='Jonn' ) |
| 326 | [<Publisher: Jonno's House of Books>] |
| 327 | >>> Publisher.objects.annotate(rating_sum=Sum('book__rating'), book_count=Count('book')).filter( Q(pk__lt=F('book_count')) | Q(rating_sum=None) ).order_by('pk') |
| 328 | [<Publisher: Apress>, <Publisher: Jonno's House of Books>] |
| 329 | |