Skip to content
Permalink
Browse files

Fixing saveMany

  • Loading branch information...
jippi authored and lorenzo committed May 9, 2012
1 parent fbd2132 commit ad4e46150a57814cba8f7d09615084798d9d1393
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/Cake/Model/Model.php
@@ -2117,6 +2117,7 @@ public function validateMany($data, $options = array()) {
} else {
$validates = $this->create($record) && $this->validates($options);
}
$data[$key] = $this->data;
if ($validates === false || (is_array($validates) && in_array(false, $validates, true))) {
$validationErrors[$key] = $this->validationErrors;
$validates = false;
@@ -2125,6 +2126,7 @@ public function validateMany($data, $options = array()) {
}
$return[$key] = $validates;
}
$this->data = $data;
$this->validationErrors = $validationErrors;
if (!$options['atomic']) {
return $return;

0 comments on commit ad4e461

Please sign in to comment.
You can’t perform that action at this time.