Hi, > > Is there a way to switch django's relationship building from INNER > > JOIN to LEFT OUTER JOIN ? > > It causes unexpected behaviour when filtering on both parent and child > > tables. > > Not really. There is a limited ability to control the join behaviour > with Q objects, but this isn't documented, and isn't particularly > robust.
OK. That's bad news, and keep up for the queryset refactor ;o) For those interested, here is how I'll fix my problem. class Book(Model) title = CharField() collection = ForeignKey(Collection) def quicksearch(self): """returns a list of fields I want to lookup. Instead of relying on joins, i'll filter on search term in quicksearch.""" output = [] for x in (self.title, getattr(self.collection, 'title', None), etc.... ): output.append(x) return output --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---