Hi all,

reading <https://docs.djangoproject.com/en/1.3/topics/db/queries/#lookups-that-span-relationships>, with the queryset

        Blog.objects.filter(entry__authors=123)

I can find all blogs that have at least one entry that has the author with id 123 in its author set.

However, in the resulting queryset there may be blogs that, besides the entries whose (co)author the author with id 123 is, *also* have additional entries to which 123 did not contribute, i.e. that only have authors other than 123.

How can I find only those blogs where *all* entries were (co-)authored by 123?

Many thanks for your help and best regards,
Carsten


[ For completeness, I tried to find words for this problem earlier at
http://groups.google.com/group/django-users/browse_thread/thread/bae63dd7904298e9, but my attempt at phrasing it was just too clumsy. Now that I understand the problem better, the above makes the old thread obsolete. ]



--
   Cafu - the open-source Game and Graphics Engine
for multiplayer, cross-platform, real-time 3D Action
          Learn more at http://www.cafu.de

--
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.

Reply via email to