Reputation: 2227
I have a NSFetchedResultsController
in one of my UITableView
and it manages the display of data. The main entity has a number or relationships and when the data in either of those relationships updates, the tableview updates. My problem is this:
If I change data in a relationship like this, everything updates correctly:
mainEntity.relationship.name = @"Random new name";
But if I change data in a relationship of a relationship, the NSFetchedResultsController
does not recieve that update:
mainEntity.relationship.relationship2.relationship3.name = @"New Random Name";
does not send the update to the NSFetchedResultsController
delegate.
Is there something that I need to do to ensure that the delegate receives the updates if a relationship of a relationship's data changes?
Upvotes: 1
Views: 242
Reputation: 4339
CoreCode,
Fetch requests are tied to a single entity. The updates are tied to that entity. This is why Core Data sometimes requires denormalized data, i.e. a custom entity that is just used for your table view. You may wish to consider making a special purpose entity.
Andrew
Upvotes: 1