When NSArray is not an Array
When NSArray is not an Array
- Subject: When NSArray is not an Array
- From: Gordon Apple <email@hidden>
- Date: Thu, 11 Jan 2007 14:06:49 -0600
Caution, rant ahead:
What is it with database designers and specifically Core Data that they
don't understand the concept of an array, the definition of which is an
ORDERED set? NSArray (NSMutableArray) are arrays, not sets -- that is,
until you try to use Core Data. Like any typical relational database, the
concept of order goes totally out the window.
Our application has many layers of lists (i.e., ordered sets, arrays,
whatever): Lists of sessions which are lists of segments which are lists of
screens which are lists of layers which are list of draw objects which are
lists of attributes which could be lists of grouped objects, etc. ORDER is
all important.
The only way around this seems to be to add an integer index field that
has to be re-sequenced every time there is an edit that affects the list.
It's a pain just to re-do what NSMutableArray and NSArrayController are
supposed to do already. A search of the cocoa-dev list showed a lot of
chatter on this subject -- too much to peruse. Has there been any progress
on ordered list with CoreData? Any other workarounds?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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