I have a 'position' entity with a to-many relationship to 'employee's. I want to use NSPredicate
to do something like this
[position.employees containsObject:meEmployee]
There is a call to perform NSPredicate
with block, but sadly it can't be used with CoreData.
How can I do this?
If you are fetching
position
entities with anyemployees
matchingmeEmployee
then you can use a predicate like this:But if the inverse relationship for
employees
isposition
, you can achieve the same with: