fixes #4861, find all recursive 2 with habtm

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7238 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
gwoo 2008-06-22 17:34:05 +00:00
parent 8b9aa057dd
commit 1ff02bde7a

View file

@ -962,7 +962,9 @@ class DboSource extends DataSource {
} else {
foreach ($merge as $i => $row) {
if (count($row) == 1) {
$data[$association][] = $row[$association];
if (empty($data[$association]) || (isset($data[$association]) && !in_array($row[$association], $data[$association]))) {
$data[$association][] = $row[$association];
}
} else {
$tmp = array_merge($row[$association], $row);
unset($tmp[$association]);