From 9cf8a77e88e043e6effa829c84c88effdc52575f Mon Sep 17 00:00:00 2001 From: phishy Date: Tue, 22 Jul 2008 12:20:18 +0000 Subject: [PATCH] added fetchResult() wrapper fixed queryAssociation(), it was producing invalid queries git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7350 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/libs/model/datasources/dbo/dbo_oracle.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cake/libs/model/datasources/dbo/dbo_oracle.php b/cake/libs/model/datasources/dbo/dbo_oracle.php index 1b362868f..9c9ab262b 100644 --- a/cake/libs/model/datasources/dbo/dbo_oracle.php +++ b/cake/libs/model/datasources/dbo/dbo_oracle.php @@ -395,6 +395,10 @@ class DboOracle extends DboSource { $this->_currentRow++; return $resultRow; } + + function fetchResult() { + return $this->fetchRow(); + } /** * Checks to see if a named sequence exists * @@ -964,6 +968,7 @@ class DboOracle extends DboSource { $ins = array_chunk($ins, 1000); foreach ($ins as $i) { $q = str_replace('{$__cakeID__$}', join(', ', $i), $query); + $q = str_replace('= (', 'IN (', $q); $res = $this->fetchAll($q, $model->cacheQueries, $model->alias); $fetch = array_merge($fetch, $res); } @@ -1007,9 +1012,10 @@ class DboOracle extends DboSource { $ins = array_chunk($ins, 1000); foreach ($ins as $i) { $q = str_replace('{$__cakeID__$}', '(' .join(', ', $i) .')', $query); - $q = str_replace('= (', 'IN (', $q); + $q = str_replace('= (', 'IN (', $q); $q = str_replace(' WHERE 1 = 1', '', $q); + $q = $this->insertQueryData($q, null, $association, $assocData, $model, $linkModel, $stack); if ($q != false) { $res = $this->fetchAll($q, $model->cacheQueries, $model->alias);