• 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: indexing non-sorted arrays in EOs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: indexing non-sorted arrays in EOs


  • Subject: Re: indexing non-sorted arrays in EOs
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 23 Apr 2008 22:01:03 -0700


On Apr 23, 2008, at 9:57 PM, Anjo Krank wrote:


Am 24.04.2008 um 06:18 schrieb Chuck Hill:

As I get into full swing of using EO's, I'm seeing one place that I know is going to bite me, and that is indexing into the array returned by the parameterless function that returns "many" relationships and assuming a certain order.

Don't. The order is undefined. It is really a set (unordered collection), not a vector. That is just the way it is.

Well... you could probably implement databaseContextWillFireArrayFaultForGlobalID in your dbc delegate and modify the fetch spec to set a sort order and in your eo's addToFoo/removeFromFoo maintain this order...

Does that delegate method get fired when elements are added in another EC and saved?


Chuck

--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >indexing non-sorted arrays in EOs (From: Jeff Schmitz <email@hidden>)
 >Re: indexing non-sorted arrays in EOs (From: Chuck Hill <email@hidden>)
 >Re: indexing non-sorted arrays in EOs (From: Anjo Krank <email@hidden>)

  • Prev by Date: Re: indexing non-sorted arrays in EOs
  • Next by Date: Web Service fails: add is not a supported operation in com.webobjects.foundation.NSArray ?
  • Previous by thread: Re: indexing non-sorted arrays in EOs
  • Next by thread: Re: indexing non-sorted arrays in EOs
  • Index(es):
    • Date
    • Thread