• 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
Best practice for Core Data "ordered" NSArray problem?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Best practice for Core Data "ordered" NSArray problem?


  • Subject: Best practice for Core Data "ordered" NSArray problem?
  • From: Frank Reiff <email@hidden>
  • Date: Fri, 28 Sep 2007 15:31:29 +0200

Sorry to everybody who is sick of this question.. I know it's been asked before but I'm wondering whether there's any news on this subject..

Core Data uses a relational database back-end, relational databases do not have a "natural" order, therefore the results returned by a query are unsorted unless you use a sorting descriptor. Creating an actual array (you now where things are in sequence irrespective of an external sorting order) thus means adding an index to the model, which makes life difficult for NSArrayController and demands lots of custom coding, etc..

As this is a very common problem, I assume that there are now some mature solutions out there to deal with this generically?

Does anybody know of a generic NSArrayController that can deal with the internal index issue, row re-ordering, etc?

Something I don't know yet is whether this problem is specific to using the SQLite store. If I use an xml store or an in-memory store is the order guaranteed to be preserved?

Thanks for your patience..

Best regards,

Frank
_______________________________________________

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


  • Follow-Ups:
    • Re: Best practice for Core Data "ordered" NSArray problem?
      • From: "I. Savant" <email@hidden>
    • Re: Best practice for Core Data "ordered" NSArray problem?
      • From: Jerry Krinock <email@hidden>
    • Re: Best practice for Core Data "ordered" NSArray problem?
      • From: Scott Thompson <email@hidden>
  • Prev by Date: Re: NSPopUpButton in NSMatrix
  • Next by Date: Re: Memory leak if alloc succeeds but init fails?
  • Previous by thread: Re: How to load Flash Player.plugin?
  • Next by thread: Re: Best practice for Core Data "ordered" NSArray problem?
  • Index(es):
    • Date
    • Thread