On 12/7/06, Aaron Roberson <[EMAIL PROTECTED]> wrote: > Is it better to create a "has-a" relationship between one-to-many > objects than to just invoke the objects separately? > > For instance, I have a product object (bean, DAO, gateway and service) > and a product items object (bean, DAO, gateway, service). Each product > has many product items. Is it better to map the product items to the > product object (array, struct or query) through the product's service > layer or to just invoke each object and pass them the product id? >
Aaron, Here is one way I handled this type of issue using the Person with many Addresses idea. http://mattw.mxdj.com/sample_servicedaobean_files.htm -- Matt Williams "It's the question that drives us." ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:263221 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4