• 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: FetchSpec binding order
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FetchSpec binding order


  • Subject: Re: FetchSpec binding order
  • From: Mike Schrag <email@hidden>
  • Date: Tue, 5 Oct 2010 00:27:55 -0400

as with anything, it's not quite that straightforward .... getAllBindings() returns the bindings in the order they appear in the qualifier, but that's based on the parsed qualifier model. i would actually expect that to generally match the order it appears in your qualifier. you can send me your qualifier and i can test it to give you a better explanation of exactly why you're seeing the ordering you're getting back.

getDistinctBindings() is uniquing them, so they're effectively going into a set. I suppose we could back it with a LinkedHashSet, but you're fundamentally getting a set back, not a list, so it's a little sketchy to ask that for a particular arbitrary order. Currently getDistinctBindings() comes back sorted, btw, so it's not random, it's just not what your qualifier specified. A LinkedHashSet would keep it consistent with getAllBindings if you don't have dupes, but would obviously be slightly stranger if you did have dupes.

ms

On Oct 5, 2010, at 12:20 AM, David Avendasora wrote:

> Hi all,
>
> I'm running into an annoying problem.
>
> The order in which fetch specification bindings are in the $fetchSpecification.allBindings and $fetchSpecification.distinctBindings are not the same, and neither match the sequence that they are put in the fetch specification in the model.
>
> This makes it very difficult to name a fetch specification in a way that matches the sequence that the bindings are passed.
>
> Is there a reason that the allBindings and distinctBindings can't be guaranteed to match the sequence they are in the model?
>
> Dave _______________________________________________
> 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

 _______________________________________________
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: 
 >FetchSpec binding order (From: David Avendasora <email@hidden>)

  • Prev by Date: Re: FetchSpec binding order
  • Next by Date: Re: FetchSpec binding order
  • Previous by thread: Re: FetchSpec binding order
  • Next by thread: Re: Bulk emailer and bounce handler?
  • Index(es):
    • Date
    • Thread