I would suggest that any method that has multiple queries be refactored so that each query is in its own method. The original method would then call each of those sub-methods to do its job. This would allow you to place a cftransaction in the parent method, while not having it in the sub-methods. This is not only better OO practice, it would also allow you to unit test each query individually instead of all the queries as a group, allowing you to more accurately pin point any problems.
Just my 2-cents -- Rob Blackburn http://www.rbdev.net On 11/29/05, Paul Kenney <[EMAIL PROTECTED]> wrote: > Never said DAO methods only have only one query each. In the case where a > single DAO method has multiple queries, you might still want to rely on the > calling code to actually manage the transaction. > > > > > On 11/29/05, Hugo Ahlenius <[EMAIL PROTECTED]> wrote: > > | This will only work as long as you do not use <cftransaction> inside > > | of your DAOs--which you shouldn't since transactions are generally at > > | the business level (multiple queries) and not the level of a single > > | query. > > > > But what says that a DAO only need to do a single query? > > > > /H. > > ########################################### > > > > This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. > > For more information, connect to http://www.f-secure.com/ > > > > > > ---------------------------------------------------------- > > You are subscribed to cfcdev. To unsubscribe, send an email to > > [email protected] with the words 'unsubscribe cfcdev' as the subject of > > the email. > > > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > > (www.cfxhosting.com). > > > > An archive of the CFCDev list is available at > > www.mail-archive.com/[email protected] > > > > > > > > > > -- > Paul Kenney > [EMAIL PROTECTED] > [EMAIL PROTECTED] > http://www.pjk.us > ---------------------------------------------------------- > > You are subscribed to cfcdev. To unsubscribe, send an email to > [email protected] with the words 'unsubscribe cfcdev' as the subject of the > email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting > (www.cfxhosting.com). > > An archive of the CFCDev list is available at > www.mail-archive.com/[email protected] ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
