On 6/1/05, Dawson, Michael <[EMAIL PROTECTED]> wrote: > The way I understand Sean, you will need to make only two database > calls: 1. to get the "master" data. 2. To get all of the addresses.
Essentially yes. One database query for the "master" data. And then one more query for a "detail" page. A lot depends on the exact setup of the objects but the thing to watch for is the temptation to slavishly map each table to an object and then try to have a single DAO for each table. Object models and relational models are different for a reason! For example, I have an application that has tasks and notes. Each task can have multiple notes but a note can't exist without a task. My system does have a DAO for the note but only for the creation of a new note. All the read operations are handled in aggregate by the task DAO and notes are maintained as a query, as a data member of the task bean. My task (data) gateway reads just basic task information (to be displayed on a task list page). My task DAO reads all the task information *and* the notes for that task. Does that help clarify? -- Sean A Corfield -- http://corfield.org/ Team Fusebox -- http://fusebox.org/ Got Gmail? -- I have 50, yes 50, invites to give away! "If you're not annoying somebody, you're not really alive." -- Margaret Atwood ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208247 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

