Adding fix for duplicate conditions being merged into the final query on self associations

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4788 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-04-05 19:00:15 +00:00
parent 4f04f09978
commit 10bb0f303a

View file

@ -891,7 +891,9 @@ class DboSource extends DataSource {
$result = $queryData['selfJoin'][0];
if (!empty($queryData['joins'])) {
foreach($queryData['joins'] as $join) {
$result['joins'][] = $join;
if(in_array($join, $result['joins'])) {
$result['joins'][] = $join;
}
}
}
if (!empty($queryData['conditions'])) {