Re: Ordered Sets and NSManagedObjectID
Re: Ordered Sets and NSManagedObjectID
- Subject: Re: Ordered Sets and NSManagedObjectID
- From: "John C. Randolph" <email@hidden>
- Date: Sat, 14 May 2005 21:22:46 -0700
On May 14, 2005, at 9:02 PM, Robert McNally wrote:
I am writing a Core Data-based application in which I am working
towards a solution of the ordered-set problem-- i.e., emulating an
(ordered) NSMutableArray container with a (unordered) to-many
relationship. In my case, I don't wish to store each element's
index as an attribute on the element itself-- I want to leave the
elements untouched. Instead, I want the NSMutableArray-like
subclass of NSManagedObject to remember the order of the elements
and reconstruct their order upon demand after the container is
fetched. The main benefit to doing things this way is so that
element objects can be shared among multiple container objects.
Sounds to me like a job for another entity. Just make an entity that
has an index attribute, and a to-one relationship to the things you
want to view in an ordered fashion.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden