I have 3 NSManagedObjet
s; Person, Stuff, and Collection.
I want to use a NSPredicate
to get a list of all Collection
s that ThePerson
has.
Example: Scott has objectA and objectB which are in collection Letters and object1 which is in collection Numbers.
I want to be able to do a fetch request and get back collection Letters and Numbers.
I tried:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"ANY stuffs.persons == %@", person];
And:
NSPredicate *predicate = [NSPredicate predicateWithFormat:@"SUBQUERY(stuffs, $s, ANY $s.persons == %@)", scott];
Any suggestions?