I agree that the ORM should handle it so the application code can treat the records as objects, but there is a very valid integrity concern when touching any fields in a database that are not necessary. Not to mention the additional overhead for the database, and the additional network traffic. There is no reason why an ORM tool can not manage the integrity of a records state, and only commit changes to the persistence of parts of that record which have changed. I'm not convinced a separate method is necessary for updating by field, but the standard crud methods should consider whether the record has changed before modifying the persistence.
This may not be an issue for medium or small web applications, but for enterprise level applications it is. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Woodward Sent: Wednesday, February 22, 2006 4:29 PM To: [email protected] Subject: Re: [Reactor For CF] "Selective Updates" (was Mapping Issue) On 2/22/06, Chris Terrebonne <[EMAIL PROTECTED]> wrote: > I use a "homemade" DAO/Record generator that creates an update > function that optionally accepts a structure that contains the fields I want updated. > Here is an example: General comment--worrying about things at that level is something that goes against the grain in terms of how ORMs handle the problem they solve. The whole point in my mind is for us as developers to think at the object level and let the ORM worry about what needs to be updated and how specifically to accomplish it. I've done quite a bit with Hibernate in Java and the issue of a selective update just doesn't ever come up; it's just not how the problem should be thought of if you're going to use an ORM. As long as the data hasn't changed I don't see why it really matters if a field gets "updated" to the same value it was before. Matt -- Matt Woodward [EMAIL PROTECTED] http://www.mattwoodward.com -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/ **************************************************************************** This email may contain confidential material. If you were not an intended recipient, Please notify the sender and delete all copies. We may monitor email to and from our network. **************************************************************************** -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/

