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 protected]) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40pobox.com > > This email sent to [email protected] _______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
