> Also, DAOs usually provide data access for a single instance > of an object, with the read method returning a transfer > object instead of a multi-row query / array of transfer > objects. If you need to select multiple rows (like your > select() method), that'd traditionally fall into a "Data > Gateway" object. A gateway would typically have methods that > selected all records or records based on a given condition. > (I think there's some debate over what a gateway should > return though - I've seen both recordsets and arrays of > transfer objects). >
I was wondering if you, or anyone, could comment more about this concept. One of the problems I have with it is that I like the fact the DAO contains all the SQL, but now we have 2 CFCs with SQL in them. Wouldn't it be nice if all the SQL code for a particular bean was contained within one file? Why should the DAO only work with one record? -ray ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at [EMAIL PROTECTED]
