On Wed, Jul 6, 2011 at 2:46 PM, Venkatraman S <venka...@gmail.com> wrote: > > > On Wed, Jul 6, 2011 at 2:10 PM, Marc Aymerich <glicer...@gmail.com> wrote: >> >> This one should work: >> Items.objects.filters(created_by__employee__org=A.org) > > Nope. Emp has a FK for User, not the other way round.
I swear this time it will work! Item.objects.filter(created_by__employees__org__in=u.employees_set.all().values_list('org')) -- Marc -- 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.