Re: How to do equivalent of LEFT JOIN ON in Django (returning all Left rows, when Right item may not exist)

2011-10-10 Thread Attempting Django
Thanks everyone for your comments. I solved the problem, not very elegantly, but solved nevertheless: q1 = OurProduct.objects.select_related().exclude(productoverride__customer=1) q2 = ProductOverride.objects.select_related().filter(customer=1) from itertools import chain customerpricelis

How to do equivalent of LEFT JOIN ON in Django (returning all Left rows, when Right item may not exist)

2011-10-06 Thread Attempting Django
Hi guys, can anyone please give me an example of how to do equivalent of a LEFT JOIN ON in Django?? I am trying to return every row from one table on the left, with any matches in a foreign table on the right (there will be only one or NULL match possible). The issue I'm having is showing left tabl