Entity A have one-to-many relationship with entity B called points
.
I have NSPredicate for B.
I need to fetch objects of A that have any object of B that satisfies this predicate.
How can i do that with one NSPredicate?
I can't do that in two separate operations (first find B, then use them to find A), because i need to keep NSFetchedResultsController for A which must react (call callbacks controllerWillChangeContent
, controller:didChangeObject:atIndexPath:forChangeType:newIndexPath:
and controllerDidChangeContent
) when any object of B is added/changed/removed.
Another note - i getting those predicate on B from other class and i don't know what it contains. Therefore i can't manually insert it in predicate on A.