> <cfset localQuery = product.getItems()> > <cfoutput query = "localQuery"> > .... > > This may actually work better since the original solution would conceivable > call the function every iteration through the loop. This way only calls it > once.
That worked, but I am hard-headed and still new to OO so I am compelled to ask, by doing this am I in anyway defeating the purpose of mapping the items to the product? Let me explain: I could simply call the getItems() method (which invokes a getItemsByAttributes() method from the gateway) directly form the items service and pass it the productid. However, I thought that by mapping the items to the product in the product service I was keeping with good OO practices, namely of creating a "has a" relationship between products and items. It kind of seems to me like by declaring a local variable and assigning it the complex object that I am some how negating the "has a" relationship. Am I overly concerned or misunderstanding OO concepts? Thanks, Aaron P.S. Jolly Green Giant, I am going to sprinkle your code on my product bean and see if I grow any items. If Ian's solution is in step with good OO practices it may just be for curiosity, but I will post back with the results anyways. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263174 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4