Mike, I thought of that too. It would probably work. The issue I have with it is if a field were to get added at some point, I'd have to make sure every possible form got that field added.
Keep thinking. I know there has to be an easier way. I fear it involves mucho 'if' statements. Matt On 3/30/06, Dawson, Michael <[EMAIL PROTECTED]> wrote: > > How about just passing *all* fields to the form? Then, you would create > visible form elements as needed and the rest of the fields would be in > hidden form elements. > > M!ke > > -----Original Message----- > From: Tanguy Rademakers [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 30, 2006 12:29 PM > To: CF-Talk > Subject: Re: OOP/CF - Update Function in a DAO > > >The first idea that came to my mind was to change all Bean argument > >defaults to something like "NODATA". Then I could put this in my query: > >SET <cfif PersonBean.getFoo() NEQ > >"NODATA">Foo='#PersonBean.getFoo()#',</cfif> > > I take it you haven't met my friend Mr. NODATA Smith? > > Basically, that's not a great idea because it's the magic string > antipattern - a normal string that means something special to your app > because you figured you'd never run across it in the wild. > > If you are really updating an existing bean, then you should be updating > a bean loaded from the DAO - in this case the idea is to change the code > that populates bean fields so that the fields not exposed on the form > are not modified from their existing values which they held when they > were loaded. > > my 0.02$, ymmv, etc. etc. > > /t > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm/link=i:4:236598 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

