Fixing handling of atomic transaction support with hasMany in Model::saveAll(), fixes #4372

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6596 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2008-03-22 21:23:06 +00:00
parent 819cd1d667
commit c4a4e9da39

View file

@ -1379,7 +1379,7 @@ class Model extends Overloadable {
foreach ($values as $i => $value) { foreach ($values as $i => $value) {
$values[$i][$this->{$type}[$association]['foreignKey']] = $this->id; $values[$i][$this->{$type}[$association]['foreignKey']] = $this->id;
} }
if (!$this->{$association}->saveAll($values, $options)) { if (!$this->{$association}->saveAll($values, array_merge($options, array('atomic' => false)))) {
$validationErrors[$association] = $this->{$association}->validationErrors; $validationErrors[$association] = $this->{$association}->validationErrors;
$validates = false; $validates = false;
} }