Ticket #310 (new enhancement)

Opened 22 months ago

Last modified 2 months 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>

Attachments

Change History

Changed 2 months ago by cfgrok

  • milestone changed from Feature Requests to 2.0.x-next-patch

Add/Change #310 (Change request for GenericORMController.cfc)

Author


E-mail address and user name can be saved in the Preferences.


Action
as new
 
Note: See TracTickets for help on using tickets.