Adding fix for Ticket #992

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@3100 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
nate 2006-06-14 23:55:17 +00:00
parent f85cff7394
commit cc35b218e1

View file

@ -628,7 +628,12 @@ class DboSource extends DataSource {
if ($deepModel->name != $model->name) {
$tmpStack = $stack;
$tmpStack[] = $assoc1;
$this->queryAssociation($linkModel, $deepModel, $type1, $assoc1, $assocData1, $queryData, true, $fetch, $recursive - 1, $tmpStack);
if ($linkModel->useDbConfig == $deepModel->useDbConfig) {
$db =& $this;
} else {
$db =& ConnectionManager::getDataSource($deepModel->useDbConfig);
}
$db->queryAssociation($linkModel, $deepModel, $type1, $assoc1, $assocData1, $queryData, true, $fetch, $recursive - 1, $tmpStack);
}
}
}