On Wed, Oct 31, 2007 at 11:09:49AM -0400, George Vilches wrote:
> 
> Stated simply:
> queryset.select_related().count() with no filter criteria generates a 
> wrong query across a ForeignKey relationship.

Hi,

do you get the correct results, if you use .distinct()?

Distinct is not enabled by default. This means, a query over foreignkeys
can give you duplicate entries in the queryset.

 Thomas

-- 
Thomas Guettler, http://www.thomas-guettler.de/
E-Mail: guettli (*) thomas-guettler + de


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to