|
Peter, 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: <cffunction
name="update" access="public" output="false"
returntype="void" description="CRUD Update function for
DAO"> <cfargument
name="columnStruct" required="no" type="struct"
default="#structNew()#"> <cfquery
name='Security_ObjectDAOUpdate' datasource='#getDatasource().getDSN()#'> <cfset
prev = 0> UPDATE
ANSWEB.dbo.Security_Object SET
<cfif
structIsEmpty(columnStruct) OR
structKeyExists(columnStruct,'objectName')><cfif
prev>,</cfif><cfset prev=1>objectName=<cfQueryParam
cfsqltype="CF_SQL_VARCHAR"
value="#SecurityObject.getobjectName()#"></cfif> <cfif
structIsEmpty(columnStruct) OR
structKeyExists(columnStruct,'objectDesc')><cfif
prev>,</cfif><cfset prev=1>objectDesc=<cfQueryParam
cfsqltype="CF_SQL_VARCHAR"
value="#SecurityObject.getobjectDesc()#"></cfif> WHERE </cfquery> </cffunction> Not the best solution, but it works for
now. Hope that answers your question. Regards, Chris From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Peter J. Farrell Chris Terrebonne said the following on 2/22/2006 3:17
PM: Peter, I dabbled in FB, but currently use
MG. Why do you ask? Chris I'm just curious how you would do an
update using MG (or Mach-II since the process would be the same in general
implementation) using selective updates without Reactor? Meaning having
your "app updating columns that I haven’t explicitly requested it
to". I'm assuming your using some type of Bean/Business/Value Object
at least in my head. -- Peter J. Farrell :: Maestro PublishingMember Team Mach-II :: Member Team Fusionhttp://blog.maestropublishing.comCreate boilerplate beans and transfer objects for ColdFusion!Fire up a cup of Rooibos!http://rooibos.maestropublishing.com/ |
- [Reactor For CF] "Selective Updates" (was Ma... Jared Rypka-Hauer
- RE: [Reactor For CF] "Selective Updates"... Chris Terrebonne
- Re: [Reactor For CF] "Selective Updates"... Jared Rypka-Hauer
- RE: [Reactor For CF] "Selective Updates&... Doug Hughes
- RE: [Reactor For CF] "Selective Updates&... Chris Terrebonne
- Re: [Reactor For CF] "Selective Updates"... Peter J. Farrell
- RE: [Reactor For CF] "Selective Updates&... Chris Terrebonne
- RE: [Reactor For CF] "Selective Updates"... Chris Terrebonne
- Re: [Reactor For CF] "Selective Updates"... Peter J. Farrell
- RE: [Reactor For CF] "Selective Updates&... Chris Terrebonne
- Re: [Reactor For CF] "Selective Updates&... Matt Woodward
- RE: [Reactor For CF] "Selective Updates"... Porter, Benjamin L.
- Re: [Reactor For CF] "Selective Updates&... Matt Woodward
- Re: [Reactor For CF] "Selective Upda... Kurt Wiersma
- Re: [Reactor For CF] "Selective ... Matt Woodward

