NSSortDescriptor for A <-->> B <-->> C relationships
NSSortDescriptor for A <-->> B <-->> C relationships
- Subject: NSSortDescriptor for A <-->> B <-->> C relationships
- From: Devarshi Kulshreshtha <email@hidden>
- Date: Wed, 10 Jul 2013 23:26:21 +0530
I am trying to initialize a NSFetchedResultsController.
In the data model I have 3 entities related to each other like this:
A <-->> B <-->> C
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.
--
Thanks,
Devarshi
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden