mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Merging fixes to trunk
Revision: [1775] Fixed error in hasOne associations git-svn-id: https://svn.cakephp.org/repo/trunk/cake@1776 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
dd3de20200
commit
83d00fc93a
1 changed files with 1 additions and 2 deletions
|
@ -451,10 +451,9 @@ class DboSource extends DataSource
|
|||
$sql = ' LEFT JOIN '.$this->name($linkModel->table);
|
||||
$sql .= ' AS '.$this->name($alias).' ON '.$this->name($alias).'.';
|
||||
$sql .= $this->name($assocData['foreignKey']).'='.$model->escapeField($model->primaryKey);
|
||||
$sql .= $this->conditions($assocData['conditions']);
|
||||
$sql .= $this->order($assocData['order']);
|
||||
|
||||
if (!in_array($queryData['joins'], $sql))
|
||||
if (!in_array($sql, $queryData['joins']))
|
||||
{
|
||||
$queryData['joins'][] = $sql;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue