I have entity Unit and Tag, each with to-many relation to other.
I am using NSFetchedResultsController to manage the data. What I need is to return distinct Unit object into NSFetchedResultsController for condition Tag.show == YES. I'm not sure how to feed all this to NSFetchedResultsController. Set entity to Unit or Tag, how to build predicate for it.
Example:
I have 6 Tag objects tag1...tag6 and 3 Unit object unit1, unit2, unit3.
tag1, tag2 are pointing to unit1, tag3, tag4 to unit2.
tag1...tag4 met show == YES condition.
So I want finally to get uni1 and unit2 into NSFetchedResultsController.