I have 2 entities in CoreData (which are relevant to this). Let’s call them objectA and objectB. Each entity has a to-many relationship with the other entity.
I have a view which uses an NSFetchedResultsController to present a list of all objectB objects (records) in a table. That all works.
Now, what I’m trying to do is, given any one objectA, present a table with every objectB that has a relationship with that specific objectA in the first section, and the rest of them in the second section. From what I’ve tried, it seems sectionNameKeyPath in NSFetchedResultsController isn’t flexible enough to allow for something like this.
Have I missed something, or are there any other ways to do this?
Unfortunately, it seems that
NSFetchedResultsControlleris not flexible enough for this, so I ended up using twoNSFetchedResultsControllers to separately fetch the first and second sections with different predicates.