mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Fixing hasMany SQL optimization (Ticket #3075)
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5541 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
a5fd1561e8
commit
44e978c194
1 changed files with 1 additions and 1 deletions
|
@ -711,7 +711,7 @@ class DboSource extends DataSource {
|
|||
return null;
|
||||
}
|
||||
$count = count($resultSet);
|
||||
if ($type === 'hasMany' && !isset($assocData['limit'])) {
|
||||
if ($type === 'hasMany' && (!isset($assocData['limit']) || empty($assocData['limit']))) {
|
||||
$ins = array();
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
$in = $this->insertQueryData('{$__cakeID__$}', $resultSet[$i], $association, $assocData, $model, $linkModel, $stack);
|
||||
|
|
Loading…
Reference in a new issue