Ticket #310 (new enhancement)

Opened 18 years ago

Last modified 16 years ago

Change request for GenericORMController.cfc

Reported by: bigbadscottyb Owned by: somebody
Priority: normal Milestone: 2.0.x-next-patch
Version: 2.0.304 Severity: normal
Keywords: Cc:

Description

I'm trying to leverage the already existing record validation you have built into ModelGlue? and Reactor.

I want to perform a data validation before the generic commit is called. I do that, and build a validation struct of array entries containing error messages, just like ModelGlue? does. I then want to call the generic commit, and append any error messages it finds to my already existing structure.

I would recommend changing line 155 in the ModelGlue?/unity/controller/GenericORMController.cfc to perform a check to see if a validation error message structure already exists, if so, just append the generic validation error messages to it, rather than overwriting it:

<cfif NOT arguments.event.ValueExists?(validationName)>

<cfset arguments.event.setValue(validationName, validation.getErrors()) />

<cfelse>

<cfset StructAppend?(arguments.event.getValue(validationName), validation.getErrors()) />

</cfif>

Change History

Changed 16 years ago by cfgrok

  • milestone changed from Feature Requests to 2.0.x-next-patch
Note: See TracTickets for help on using tickets.