mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixing unnecessary extra calls to 'afterFind' callback of 'hasMany' associated models. Closes #995
This commit is contained in:
parent
82fffe6914
commit
bfaaa6b8ba
1 changed files with 6 additions and 2 deletions
|
@ -845,6 +845,10 @@ class DboSource extends DataSource {
|
||||||
$stack = array($assoc);
|
$stack = array($assoc);
|
||||||
$db->queryAssociation($model, $linkModel, $type, $assoc, $assocData, $array, true, $resultSet, $model->recursive - 1, $stack);
|
$db->queryAssociation($model, $linkModel, $type, $assoc, $assocData, $array, true, $resultSet, $model->recursive - 1, $stack);
|
||||||
unset($db);
|
unset($db);
|
||||||
|
|
||||||
|
if ($type === 'hasMany') {
|
||||||
|
$filtered []= $assoc;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue