Skip to content
Permalink
Browse files

Backporting changes form 2.2 to fix some edge cases on deep saving. F…

…ixes #2879
  • Loading branch information...
lorenzo committed May 20, 2012
1 parent 7dbd6bc commit 16847b0d970fbca8c716728a55c90ba9f0962bc6
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/Cake/Model/Model.php
@@ -2343,6 +2343,11 @@ public function validateAssociated(&$data, $options = array()) {
$return[$this->alias] = true;
}
$data = $this->data;
if (!empty($options['deep']) && isset($data[$this->alias])) {
$recordData = $data[$this->alias];
unset($data[$this->alias]);
$data = array_merge($data, $recordData);
}
$associations = $this->getAssociated();
foreach ($data as $association => &$values) {

0 comments on commit 16847b0

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