1👍
✅
I don’t know why you say you can’t use the annotate()
method because you need to filter. That is not only supported, but explicitly described in the documentation.
Product.objects.filter(order__review__is_published=True).annotate(Count('order__review'))
Source:stackexchange.com