That does sound like a bug. I haven't seen that problem with arrays, have you Jeff?
Extended arrays are going to stick around. In very, very rare situations they the only solution. In 6.1 I was able to change array updates to use the same functions as primary objects. I believe configs have been able to support arrays as of one of the recent 6.0 releases, thanks to improvements in the library picker. We haven't tested it extensively though. Blair On Fri, Nov 4, 2011 at 2:43 AM, Jeff Coughlin <[email protected]> wrote: > I could be wrong, but that sounds like a bug. It shouldn't be requiring > you to name it a very specific way like that (forcing you to use the string > "IDs" in your array name reference). > > @Geoff, please don't kill extended arrays. It's an extremely useful > feature if one knows how to use it properly (we use it when the time calls > for it - especially on larger projects). FarCry's ORM is great, but it > lacks a lot of advanced features that more robust ORMs have. However, > extended arrays at least give us a little extra usage for adding those > extra fields when needed (and trust me, for more complex projects it's > sometimes needed). I know we need to pull certain features and rethink > others every now and then, and maybe extended arrays could use a little > more love. But they work, and they work well. Lets please not make > FarCry's ORM take a step backwards with this one. > > Wishlist: :) > Personally I'd like to see extended arrays get more attention and better > recognition from the CMS as truer objects. I'd also love to see the ORM > have better distinction with many-to-one, one-to-many, and many-to-many > (yes, FarCry has these... sort-of, but it could be much better defined). > Finally, I'd also like to see configuration objects (packages.forms) act > more like FarCry objects (allowing things like arrays). Okay, all a > wishlist I know. But it doesn't hurt to ask. I'm not against the idea of > migrating FarCry to use CF9's ORM either (don't throw tomatoes just yet. > It's just a thought :). > > -- > Jeff Coughlin > Web Application Developer > [email protected] > http://jeffcoughlin.com/blog > > > > On Nov 3, 2011, at 10:57 AM, James Buckingham wrote: > > Hi group, > > I've finally managed to work this one out. > > The problem seems to be coming from this line in the CMS > Packages > > Rules > ruleHandpicked.cfc. > > <cfproperty ftSeq="2" ftFieldSet="Selected Objects" > *name="aObjects"*type="array" > ftJoin="dmEvent,dmFacts,dmFlash,dmFile,dmImage,dmInclude,dmLink,dmNews,dmHTML" > arrayProps="webskin:string" ftLabel="Select Objects" /> > > When the BaseGateway is doing lookups through joining tables it now seems > to rely on there being a _aObjectIDs suffix on the table name. > > That's a change from our 5.2.3 copy because FarCry didn't used to care > what the property was called (or is this maybe a bug in core if it's not > actually meant to care?) > > The steps I went through to fix this are:- > > 1) Remove the "aObjects" property above and replace it with one called > "aObjectIDs". Deploy that through the webtop. Syntax I've got for this is:- > > <cfproperty ftSeq="2" ftFieldSet="Selected Objects" name="aObjectIDs" > type="array" arrayProps="webskin:string" ftLabel="Select Objects" > > ftJoin="dmEvent,dmFacts,dmFlash,dmFile,dmImage,dmInclude,dmLink,dmNews,dmHTML" > /> > > The methods in that rule ftEditAObjects and ftValidateAObjects also need > to be renamed to ftEditAObject*ID*s and ftValidateAObject*ID*s or the > formtool won't load into the page. > > In my case, as I'm extending the Plugin's Handpicked Rule anyway, I've > placed new methods in my project and just passed the request up to the > plugin's original methods. > > <cffunction name="ftEditAObjectIDs" access="public" output="false" > returntype="string" hint="This is going to called from ft:object and will > always be passed 'typename,stobj,stMetadata,fieldname'."> > <cfargument name="typename" required="true" type="string" > hint="The name of the type that this field is part of."> > <cfargument name="stObject" required="true" type="struct" > hint="The object of the record that this field is part of."> > <cfargument name="stMetadata" required="true" type="struct" > hint="This is the metadata that is either setup as part of the type.cfc or > overridden when calling ft:object by using the stMetadata argument."> > <cfargument name="fieldname" required="true" type="string" > hint="This is the name that will be used for the form field. It includes > the prefix that will be used by ft:processform."> > <cfargument name="stPackage" required="true" type="struct" > hint="Contains the metadata for the all fields for the current typename."> > <cfreturn ftEditAObjects( > typename = arguments.typename, > stObject = arguments.stObject, > stMetadata = arguments.stMetadata, > fieldname = arguments.fieldname, > stPackage = arguments.stPackage > ) /> > </cffunction> > > 2) I then run a migration script that copies the records from the old > aObjects table to the new aObjectIDs one. Happy to drop that in here as > well if people need. > > Handpicked rule, and our CaseStudy that had the same aObject name, are now > fixed! > > ----- > > So I guess in terms of a fix for future releases you'd be looking to > either changing that property name on the CMS rule or the BaseGateway needs > something in there to look for a suffix of the properties name instead. > > Hope that helps someone else & I'll drop reference to this in the bug > ticket as well. > > Cheers, > James > > -- > You received this message cos you are subscribed to "farcry-dev" Google > group. > To post, email: [email protected] > To unsubscribe, email: [email protected] > For more options: http://groups.google.com/group/farcry-dev > -------------------------------- > Follow us on Twitter: http://twitter.com/farcry > > > -- > You received this message cos you are subscribed to "farcry-dev" Google > group. > To post, email: [email protected] > To unsubscribe, email: [email protected] > For more options: http://groups.google.com/group/farcry-dev > -------------------------------- > Follow us on Twitter: http://twitter.com/farcry > -- You received this message cos you are subscribed to "farcry-dev" Google group. To post, email: [email protected] To unsubscribe, email: [email protected] For more options: http://groups.google.com/group/farcry-dev -------------------------------- Follow us on Twitter: http://twitter.com/farcry
