On 2/4/07, Mike Axiak <[EMAIL PROTECTED]> wrote:
>
> Below is the SQL the query,
> User.objects.filter(y|z).distinct().count(),
> generates.
>
> It seems to do the correct OR for the where clauses, and yet still
> uses an INNER JOIN when that type of join is inappropriate for this
> particular query. Is this a known problem? Did I write the queries
> incorrectly?

Depends on what you are trying to do.

The INNER JOIN is a correct interpretation of what you asked Django to
do - Q(registrationprofile__student_info__isnull = False) is
interpreted as 'follow the registrationprofile relation, and on that
related object, check that the value of student_info is not NULL'.

To help solve your problem, it would be helpful to have some more
details. What models are you using to generate this query? What query
are you expecting to see? What results are you expecting to see?

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
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