On Tue, 25 Jan 2005 22:08:35 -0500, Bill Rawlinson <[EMAIL PROTECTED]> wrote: > hrm., No sorry I guess I generalized too much. It isn't a situation > I am facing specifically - and that is why my contrived example didn't > really convey my question I guess. I think my original answer still applies. I just focused on the student example because it's nice an concrete. :) Let me try again in more abstract terms.
Each class is supposed to have one responsiblity, right? I see persisting data and changing data as two different responsibilities. So if the DAO is persisting data I don't think it should be responsible for changing data or making decisions about changing data. That's my gut feeling. I'm afraid that by putting that code to remove references in the DAO you may be hiding a business rule. If you've used Fusebox I'm sure you can identify with the idea that business logic doesn't go in qry files. > My initial feeling has been to have it in the DAO for the referenced > object (Certification, GradeLevel, whatever)- but the "textbook" > definition of DAO I keep seeing is that they only effect one row in > the table. That may be true. I doubt that I know any more about it than you do, but it doesn't make any sense to me. Isn't a DAO supposed to abstract away the storage mechansim? What if you're storing objects in an OODB or an XML file? They don't even have rows. Patrick -- Patrick McElhaney 704.560.9117 http://pmcelhaney.blogspot.com ---------------------------------------------------------- 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 www.mail-archive.com/[email protected]
