Re: Comparator blocks in NSSortDescriptor not supported in Core Data?
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