Annotate with complex queries using Q

14 views
Skip to first unread message

ravi singh

unread,
Mar 23, 2018, 9:03:14 AM3/23/18
to Django users
Hello Guys,

I am doing complex query using Q objects which is giving me wring 'count' of foreignkey objects that i am calculating using annotation. 
I can confirm the annotation result is correct when no Q object is being used in the query.

Is it an expected behaviour?

How can i overcome this?

Regards
Reply all
Reply to author
Forward
0 new messages