> But all of this is besides the point, because one way or the other, 
> Django is doing *something* wrong.  Sometimes the .count() returns 6, 
> and sometimes it returns 2 in the provided examples.

About .distinct():

Django does not count: It uses 'SELECT count(*) ...'. The results
you see are from your database. 

Have a look at the used sql statements with [1] or
    from django.db import connection
    assert False, connection.queries


1: SQLLogMiddleware http://www.djangosnippets.org/snippets/344/

Some days ago, I was confused, too, because one QuerySet contained
an object several times.

I didn't looked at the select_related problem, since I never used it.

 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