Hi folks,
I've reviewed the db api documentation page, and I'm pretty sure it
didn't have an example that would help me with this request.  I'd like
something like the "IN" operator that can be used in a lookup on a
field in a related model, but more like something that I guess could
be called something like "ALL_IN".  Example:
Models:
Article (title, pub_date, etc...)
TaggedArticle (article_id, tag)

One article can of course have multiple tags.  What if I wanted to
find Articles that have _all_ the tags in a particular set.  Similar
to IN:

Article.objects.filter(taggedarticle__tag__in=['python', 'perl',
'java'])

That would give me articles that have tags for python OR perl OR
java.  But what if I want a quick way to find all articles that have
all three of those tags (they may have more tags, but they at least
have all of those three.)

I've learned about making my own Manager class, so that's definitely
possible, but does there happen to be a built-in way?

Thx much,
bill


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to