Yeah, that's pretty much the approach I think I'll take, just seems like a hack to me.
Thanks mate, sure this will work! I've been meaning to build some form of iterator for a while now anyway, so I can loop arrays, structs and lists in the same way, perhaps I'll enhance it with a sorter for structs. Rob On 17 Jun 2011, at 15:23, James Allen wrote: > No probs mate – I know that feeling very well as I’ve often come back to this > and tried to be able to sort a struct. Then realised that no matter what I > do, the order is still random. At least with Railo it’s alphabetical so some > consistency. > > Yeah I think the way to do it is grab the key list, sort that then loop to > extract the data in the order you require. > > James. > > --- > James Allen > E: [email protected] > Blog: http://jamesallen.name > Twitter: @CFJamesAllen (Coldfusion / Web development) > Twitter: @jamesallenuk (General) > Twitter: @JamesAllenVoice (Voiceover) > > From: [email protected] [mailto:[email protected]] On > Behalf Of Robert Rawlins > Sent: 17 June 2011 15:21 > To: [email protected] > Subject: Re: [transfer-dev] Order / Sort on 12M Struct > > Hey J, > > Thanks for that bud. My guess would be that you're right. Bugger, what a > right royal pain. > > Seems I can do something with 'structSort()' which will help me out. > > I BET this is one of those really dumb things where Adobe can't change the > implementation because it would break backwards compatibility. > > I'll get structSorting and see what happens. Thanks mate. > > Rob > > On 17 Jun 2011, at 15:16, James Allen wrote: > > > Hi Rob, > > Structs in CF don’t have any inherent order to them. The keys will appear in > the weirdest of orders no matter what you do. > > At least that’s how I remember it. In Railo it appears the keys are ordered > alphabetically though I don’t think that is true in ACF. > > I could be wrong, but I’m sure that’s the score with structs. > > --- > James Allen > E: [email protected] > Blog: http://jamesallen.name > Twitter: @CFJamesAllen (Coldfusion / Web development) > Twitter: @jamesallenuk (General) > Twitter: @JamesAllenVoice (Voiceover) > > From: [email protected] [mailto:[email protected]] On > Behalf Of Robert Rawlins > Sent: 17 June 2011 15:10 > To: [email protected] > Subject: [transfer-dev] Order / Sort on 12M Struct > > Hello Guys, > > I have a 12M relationship between to classes with the struct collection type. > > It seems from the docs, that when using array collections, I can specify a > sort or order property. How can I do this with 'struct'? Is it possible? > > Thanks, > > Robert > -- > Before posting questions to the group please read: > http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer > > Try out the new Transfer ORM Custom Google Search: > http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8 > > You received this message because you are subscribed to the Google Groups > "transfer-dev" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/transfer-dev?hl=en > > -- > Before posting questions to the group please read: > http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer > > Try out the new Transfer ORM Custom Google Search: > http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8 > > You received this message because you are subscribed to the Google Groups > "transfer-dev" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/transfer-dev?hl=en > > -- > Before posting questions to the group please read: > http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer > > Try out the new Transfer ORM Custom Google Search: > http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8 > > You received this message because you are subscribed to the Google Groups > "transfer-dev" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/transfer-dev?hl=en > > -- > Before posting questions to the group please read: > http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer > > Try out the new Transfer ORM Custom Google Search: > http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8 > > You received this message because you are subscribed to the Google Groups > "transfer-dev" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/transfer-dev?hl=en -- Before posting questions to the group please read: http://groups.google.com/group/transfer-dev/web/how-to-ask-support-questions-on-transfer Try out the new Transfer ORM Custom Google Search: http://www.google.com/cse/home?cx=002375903941309441958:2s7wbd5ocb8 You received this message because you are subscribed to the Google Groups "transfer-dev" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/transfer-dev?hl=en
