Re: Django query not returning all objects

2016-08-18 Thread Koonal Bharadwaj
Hi Todor, I have implemented something similar: cases = HeartFlowCase.objects.all().annotate(Count('hf_id', distinct=True)) I also tried your suggestion and both seem to produce the same results. The number of duplicates is minimized but not removed entirely. Also the same problem when applyi

Re: Django query not returning all objects

2016-08-18 Thread Koonal Bharadwaj
gt; > > On Thu, Aug 18, 2016 at 2:58 AM, Koonal Bharadwaj > wrote: > >> Hello, >> >> The issue: >> >> When trying to order_by on a related model duplicate entries are created. >> I solved this with an OrderedSet that is applied after paginating ( &

Django query not returning all objects

2016-08-17 Thread Koonal Bharadwaj
Hello, The issue: When trying to order_by on a related model duplicate entries are created. I solved this with an OrderedSet that is applied after paginating ( http://code.activestate.com/recipes/576694/). However, when I try to paginate the queryset, all the results are not returned. It's miss