Hi Luis, On 09/04/2014 01:22 PM, Luis Masuelli wrote: [snip] > So if I iterate I'm getting a non-unique iteration and the > second-to-fifth iterations will yield objects without the related > `preguntas` (i.e. for those objects, the populated `preguntas` has a > `count` of 0). > > Is this a bug? Seems it is iterating over the join instead of over the > objects. How can I work in a django-way to avoid that?
"Is this a bug?" questions should be asked on the django-users mailing list. Short answer: no, I don't believe it's a bug, it's expected behavior, and you can probably fix it by adding .distinct() to your query. Carl -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/5408BE01.8020807%40oddbird.net. For more options, visit https://groups.google.com/d/optout.
