Fixing unnecessary extra calls to 'afterFind' callback of 'hasMany' associated models. Closes #995

This commit is contained in:
ADmad 2010-09-05 23:52:45 +05:30
parent 82fffe6914
commit bfaaa6b8ba

View file

@ -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;
}
} }
} }
} }