mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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:
parent
4f04f09978
commit
10bb0f303a
1 changed files with 3 additions and 1 deletions
|
@ -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'])) {
|
||||
|
|
Loading…
Reference in a new issue