On Sep 12, 9:53 pm, tom <toab...@googlemail.com> wrote: > Hi, > > i want to produce a left-join query with the django orm. Can anybody > help howto do the following query? > > SELECT S.value, D.value from data as S left join data as D on > S.entry_id=D.entry_id; > > Cheers tom
What's the point of this query? What are you trying to achieve? I believe Django will automatically do a left-join query if your ForeignKey has null=False. But your question doesn't seem to be about left join queries in general, it's about the specific case where you join a table to itself. But without understanding why you'd want to do what you're doing here, I can't answer. -- DR. --~--~---------~--~----~------------~-------~--~----~ 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---