• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Ordered Sets and NSManagedObjectID
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Ordered Sets and NSManagedObjectID
      • From: Robert McNally <email@hidden>
References: 
 >Ordered Sets and NSManagedObjectID (From: Robert McNally <email@hidden>)

  • Prev by Date: Ordered Sets and NSManagedObjectID
  • Next by Date: Re: launch safari to open an url
  • Previous by thread: Ordered Sets and NSManagedObjectID
  • Next by thread: Re: Ordered Sets and NSManagedObjectID
  • Index(es):
    • Date
    • Thread