I am trying to initialize a NSFetchedResultsController.
In the data model I have 3 entities related to each other like this:
A <-->> B <-->> C
(ie. A to B: one to many relationship and B to C: one to many relationship)
Entity 'A' has a property 'name' and entity 'C' has property 'someDate'.
I want to get all managedObjects belonging to entity 'A', sorted in below order, when I fire a fetch request against it:
1. 'someDate' == today's date (AND) ascending order by name
2. ascending order by name
ie. first it should enlist the objects in 'A' for which 'someDate' in 'C' is today's date, this list should be further sorted by 'name', then it should enlist remaining objects in 'A' (for which 'someDate' != today's date) sorted by 'name'
Please suggest how can I achieve it in a single fetch request.