Permalink
Browse files

Fixing saveMany

  • Loading branch information...
1 parent b4a42e4 commit e8fce37a6562904083f40b4cb3f1649bf23ceeff @jippi jippi committed May 9, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/Cake/Model/Model.php
View
2 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 e8fce37

Please sign in to comment.