diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index cc7f0e658..e980fb4cd 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -1634,15 +1634,10 @@ class Model extends Object { return $this->saveMany($data, $options); } if ($options['validate'] === 'only') { - $this->create($data); - $validates = $this->validates($options); $validatesAssoc = $this->validateAssociated($data, $options); - if (!$validates) { + if (isset($this->validationErrors[$this->alias]) && $this->validationErrors[$this->alias] === false) { return false; } - if (is_bool($validatesAssoc)) { - return $validates && $validatesAssoc; - } return $validatesAssoc; } return $this->saveAssociated($data, $options); @@ -1912,7 +1907,7 @@ class Model extends Object { if (!$options['atomic']) { return $return; } - if (!empty($this->validationErrors)) { + if ($return[$this->alias] === false || !empty($this->validationErrors)) { return false; } return true;