mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
819cd1d667
commit
c4a4e9da39
1 changed files with 1 additions and 1 deletions
|
@ -1379,7 +1379,7 @@ class Model extends Overloadable {
|
|||
foreach ($values as $i => $value) {
|
||||
$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;
|
||||
$validates = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue