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: Laurent Daudelin <email@hidden>
- Date: Thu, 17 Jan 2013 01:50:51 -0800
On Jan 17, 2013, at 01:06, Kyle Sluder <email@hidden> wrote:
> 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
Thanks, Kyle. I thought it was something like that but my brain is in slow motion at this time after a long day...
-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin http://www.nemesys-soft.com/
Logiciels Nemesys Software email@hidden
_______________________________________________
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