From 83d00fc93a8f72f1a34ea0b3806062720b73331a Mon Sep 17 00:00:00 2001 From: phpnut Date: Thu, 12 Jan 2006 18:34:16 +0000 Subject: [PATCH] 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 --- cake/libs/model/datasources/dbo_source.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index 448f340b8..825d81ec6 100644 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -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; }