On Wed, Jun 10, 2009 at 3:24 PM, Streamweaver <streamwea...@gmail.com>wrote:
> > Thanks so much for the reply. > > Oddly the method you suggests throws an error but I'm not sure why. > > The solution I came up with is as follows: > > User.objects.order_by('username').filter > (project__owner__isnull=False).distinct() | User.objects.filter > (release__owner__isnull=False).distinct() > > I would expect the line you wrote to give the same results but when I > try it I get an Template Error of "Caught an exception while > rendering: no such column: U1.owner_id" I have no idea why. > > It's working for me so I don't have a problem now but I'm definitly > missing something about why I'm getting this error at all. > An error like that -- where the ORM generates SQL that is incorrect -- is generally a bug in Django. In this case I can recreate it with the 1.0.2 release, but not with current trunk or 1.0.X branch code, so it is apparently a bug that has been found and fixed since 1.0.2. Karen --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---