cakephp/cakephp — pull request #641 by Jippi (2012-05-09 20:50:34+00:00)
Title: Copy changes made to $this->data in beforeValidate callbacks 

Back to saveAssociated data variable

This allow changes in beforeValidate to be saved

Code like this will not work without this patch

It used to work in 1.3 and 2.0

data[$this->alias]['test'] = 1;
return parent::beforeValidate();
}

public function beforeSave($options = array()) {
if (empty($this->data[$this->alias]['test'])) {
die('fail');
}
die('ok');
}
}