From c1f74c28aeb12f6f603c772e74d8e752173a33bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lorenzo=20Rodr=C3=ADguez?= Date: Tue, 16 Mar 2010 16:49:57 -0430 Subject: [PATCH] Fixing postgres self join error --- cake/libs/model/datasources/dbo_source.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index a0135e5d34a..de1396de10c 100755 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -1663,6 +1663,8 @@ function _matchRecords(&$model, $conditions = null) { $originalField = $field; if (strpos($field, '.') !== false) { list($alias, $field) = explode('.', $field); + $field = ltrim($field, $this->startQuote); + $field = rtrim($field, $this->endQuote); } if (!$model->hasField($field)) { $noJoin = false;