Hi, Has anybody found a way to add an table to query with an outer join? I tried the Obvious Thing:
queryset = Reader.objects.all().extras( select = {'other_name': 't.name'}, tables = ["left outer join other_table t on t.id = hr_reader.other_id"])) That results in the database complaining about an extra comma, because the tables list is simply put into the generated query's FROM cause with commas between each item. I'm currently working around this by creating a database VIEW that performs the outer join, then adding that view to the extras. It works, but it's ugly. Anybody got a different way to do it? Alan. -- Alan Green [EMAIL PROTECTED] - http://bright-green.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---