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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to