Details
-
Type:
Bug
-
Status:
Reopened
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.2.2
-
Fix Version/s: None
-
Component/s: Validators
-
Labels:None
-
Environment:PHP 5.3.1, Mac OS X 10.6
Description
I wonder why Validation exception is thrown only if internal nesting level of transaction is 1 and the manual nesting level is not considered.
Line 262 - lib/Doctrine/Transaction.php:
if ($this->_internalNestingLevel == 1) {
$tmp = $this->invalid;
$this->invalid = array();
throw new Doctrine_Validator_Exception($tmp);
}
I have a large database with a lot of tables and relationships. At some case the validation exception is not thrown if the validation fails.
If I add $this->_nestingLevel into this condition:
if ($this->_internalNestingLevel == 1 || $this->_nestingLevel == 1) {
$tmp = $this->invalid;
$this->invalid = array();
throw new Doctrine_Validator_Exception($tmp);
}
Then the validation exception is thrown as excepted.
I don't know why you ignore here the nesting level.
It would be great if you could explain me more about these lines.
I ran the unit test with this modification and got the same result.