On Thu, 2007-09-06 at 21:25 +0800, Russell Keith-Magee wrote: > 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.
My bad; you're right. Only m2m does outer joins on trunk at the moment.:( I've been looking at the new stuff too much lately. This problem is fixed there, so if people can wait until that lands very shortly it will go away. Malcolm -- Everything is _not_ based on faith... take my word for it. http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---