I have modeled a Person/Tag relationship. It's a many to many relationship; a person can have multiple tags and a tag can be associated to multiple people.
I am trying to run a query to see get a list of people, that have been tagged with EVERY tag of a set of tags. For Example: Every person that has been tagged with 'FOO' and 'BAR'.
This is the code I was trying with no success.
NSPredicate *attributePredicate = [NSPredicate predicateWithFormat:
@"ALL personTags.tagName in %@", filtersArray];
[subPredicates addObject:attributePredicate];;
Is there any way around this? I'm using SqlLite as the persistent store. I have around 2000 people in the database and around 100 different tags, only a few would tags applied at the same time.