• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSSortDescriptor for A <-->> B <-->> C relationships
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: Re: NSOutlineViews and Mountain Lion
  • Next by Date: Re: Unrecognized selector in release build, not in debug build
  • Previous by thread: Re: mobile_house_arrest
  • Next by thread: [MEET] CocoaHeadsNYC this Thursday
  • Index(es):
    • Date
    • Thread