Core Data, sorting on dependent values
Core Data, sorting on dependent values
- Subject: Core Data, sorting on dependent values
- From: Mickaƫl Remars <email@hidden>
- Date: Thu, 26 Jul 2007 12:41:32 +0200
Hello,
I face an issue with Core Data and sorting.
Model side, I have a 'Person' entity. 'Person' has 'firstName' and
'lastName' attributes coded within Core Data model. Then, I have a
*derived value* 'fullName'.
Interface side, I have an NSArrayController based on 'Person' entity.
I also have an NSTableView which one column is bind to derived value
'fullName'.
Now what I want to achieve is to sort table view by column 'fullName'
*before* displaying the table. In other words, I don't want the end-
user to sort manually, at least on application startup. So, when I
*programatically* apply a sort descriptor based on 'fullName' key,
Core Data complains that 'fullName' is not part of entity model. (I
agree off course agree with that).
Does it mean that it is not possible to sort on a derived value when
using Core Data ?
If so, how can I implement that kind of sorting ?
Thank in advance
_______________________________________________
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