• 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
Re: Comparator blocks in NSSortDescriptor not supported in Core Data?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Comparator blocks in NSSortDescriptor not supported in Core Data?


  • Subject: Re: Comparator blocks in NSSortDescriptor not supported in Core Data?
  • From: Kyle Sluder <email@hidden>
  • Date: Thu, 17 Jan 2013 01:06:02 -0800

On Thu, Jan 17, 2013, at 12:31 AM, Laurent Daudelin wrote:
> Any reason why comparator blocks are not supported in NSSortDescriptor
> when used for an NSFetchRequest? I tried one unaware they were not
> supported and I got an exception:
>
> *** Terminating app due to uncaught exception
> 'NSInvalidArgumentException', reason: 'unsupported NSSortDescriptor
> (comparator blocks are not supported)'

Guessing you're using a SQLite store? The SQLite store converts fetch
requests into SQL queries, and there's no way to express a block
comparator as a SQL query.

See the section Fetch Predicates and Sort Descriptors of the Persistent
Store Features chapter of the Core Data Programming Guide:
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/CoreData/Articles/cdPersistentStores.html

--Kyle Sluder
_______________________________________________

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

  • Follow-Ups:
    • Re: Comparator blocks in NSSortDescriptor not supported in Core Data?
      • From: Laurent Daudelin <email@hidden>
References: 
 >Comparator blocks in NSSortDescriptor not supported in Core Data? (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Re: Custom View drawRect method is not invoked when use with AutoLayout
  • Next by Date: Thread synchronization via queue
  • Previous by thread: Comparator blocks in NSSortDescriptor not supported in Core Data?
  • Next by thread: Re: Comparator blocks in NSSortDescriptor not supported in Core Data?
  • Index(es):
    • Date
    • Thread