>> You can do this already. You just set up a one to >> many join in your Transfer configuration, and then >> when you have a Book you say something like >> "getAuthorArray()"
Oh -- Well, that makes me look rather silly then, doesn't it! I'll run through the docs again and pay closer attention. I had cfdump'ed a TransferObject when I was testing, so I must have either set it up wrong in the configuration or missed the method. Jonathon -----Original Message----- From: Brian Kotek [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 24, 2007 12:02 PM To: CF-Talk Subject: Re: programmatically add functions to a CFC On 10/24/07, Jonathon Stierman <[EMAIL PROTECTED]> wrote: > > > > Querying it is what I meant -- sorry for the confusion! What I'd love > is a "Get me a list/query/enum of all the Book records written by this > Author" > method from within an Author object. As you noted, I could do it with > TQL, or I could write my own decorator that has that method. What I'm > trying to get set up though is a generic object that does all this > *without* me having to write my own TQL or custom code! The > relationship data is there -- why the need to custom-code it? > > That's really the core of what I'm trying to build "If I know the > schema, I should be able to dynamically build a decent CRUD > application out of it." You can do this already. You just set up a one to many join in your Transfer configuration, and then when you have a Book you say something like "getAuthorArray()" (if you told Transfer that you want the relationship to use an array) and you get back an array of Author objects associated with the book. You don't need a decorator or TQL if you're just pulling related records. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade to ColdFusion 8 and integrate with Adobe Flex http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJP Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292007 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

