On Sat, 20 Nov 2004 15:27:32 +0100, Magnus Wege <[EMAIL PROTECTED]> wrote: > The argument struct can then be a query or attributes from a form. Data > coming from the query doesn't need to be validated so the > setObjectByStruct(struct,structtype) is given the optional argument > structtype. This argument initiates the validation before setting the data > to the CFC's property (<cfif structtype neq "query">...do > validation...</cfif>). >
I agree with Barney. It would make more sense to have a boolean argument to specify whether validation should be performed. And if the decision of whether to validate the data takes place outside the CFC maybe validation should be triggered by a separate function? <cfset myObject.setObjectByStruct(struct)> <cfset myObject.validate()> If you're working with a query that doesn't need to be validated just don't call the validate function. 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 [EMAIL PROTECTED]
