From e8fce37a6562904083f40b4cb3f1649bf23ceeff Mon Sep 17 00:00:00 2001 From: Christian Winther Date: Wed, 9 May 2012 23:59:02 +0200 Subject: [PATCH] Fixing saveMany --- lib/Cake/Model/Model.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Cake/Model/Model.php b/lib/Cake/Model/Model.php index 43c6d04e0..ab12d98db 100644 --- a/lib/Cake/Model/Model.php +++ b/lib/Cake/Model/Model.php @@ -2117,6 +2117,7 @@ class Model extends Object implements CakeEventListener { } 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 @@ class Model extends Object implements CakeEventListener { } $return[$key] = $validates; } + $this->data = $data; $this->validationErrors = $validationErrors; if (!$options['atomic']) { return $return;