On 9/6/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > When you run Question.objects.filter(answer__isnull=True), this gets > > turned into an SQL query something like: > > > > SELECT Question.* from Question INNER JOIN Answer WHERE Question.id = > > Answer.question_id WHERE Answer.id IS NULL > > Umm, no it doesn't. :-) > > It gets turned into a join using LEFT OUTER JOIN always. so entries not > appearing in the right hand table will still appear in the result set.
Erm... except when it does :-) Vis, line 1064 and 1089 of current trunk query.py. Its been a while, but IIRC, 1089 is the bit dealing with 1-N relations. Russ %-) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---