[Flow] Action Validation of Model
Benjamin Robichaud
b.robichaud at gmail.com
Fri Nov 1 17:04:04 CET 2013
Hi,
I'm using Flow 2.0.0 and have stumbled across an issue regarding validation of objects during an action call.
In the Blog example, let's say the Blog contains many thousands of Posts, and that some fields of Post have validation annotations (StringLength, etc.). Whenever the showAction is called, the framework runs the validator on the Blog as well as *all* the Posts in the blog, which is unnecessary, and this takes 15-20 seconds.
I noticed that the @Flow\IgnoreValidation annotation is only used to not display the error messages of a specified argument, where I assumed it would not run the validator at all.
In fact, the problem lies in this call in the callActionMethod() of ActionController.cpp :
$validationResult = $this->arguments->getValidationResults();
This is run regardless of the @Flow\IgnoreValidation.
My question is, is there anyway to bypass validation of my object in an action method since it is unnecessary to validate the object in a showAction, for example.
Thanx
More information about the Flow
mailing list