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
This commit is contained in:
phishy 2008-07-22 12:20:18 +00:00
parent 2bf7181f05
commit 9cf8a77e88

View file

@ -395,6 +395,10 @@ class DboOracle extends DboSource {
$this->_currentRow++; $this->_currentRow++;
return $resultRow; return $resultRow;
} }
function fetchResult() {
return $this->fetchRow();
}
/** /**
* Checks to see if a named sequence exists * Checks to see if a named sequence exists
* *
@ -964,6 +968,7 @@ class DboOracle extends DboSource {
$ins = array_chunk($ins, 1000); $ins = array_chunk($ins, 1000);
foreach ($ins as $i) { foreach ($ins as $i) {
$q = str_replace('{$__cakeID__$}', join(', ', $i), $query); $q = str_replace('{$__cakeID__$}', join(', ', $i), $query);
$q = str_replace('= (', 'IN (', $q);
$res = $this->fetchAll($q, $model->cacheQueries, $model->alias); $res = $this->fetchAll($q, $model->cacheQueries, $model->alias);
$fetch = array_merge($fetch, $res); $fetch = array_merge($fetch, $res);
} }
@ -1010,6 +1015,7 @@ class DboOracle extends DboSource {
$q = str_replace('= (', 'IN (', $q); $q = str_replace('= (', 'IN (', $q);
$q = str_replace(' WHERE 1 = 1', '', $q); $q = str_replace(' WHERE 1 = 1', '', $q);
$q = $this->insertQueryData($q, null, $association, $assocData, $model, $linkModel, $stack); $q = $this->insertQueryData($q, null, $association, $assocData, $model, $linkModel, $stack);
if ($q != false) { if ($q != false) {
$res = $this->fetchAll($q, $model->cacheQueries, $model->alias); $res = $this->fetchAll($q, $model->cacheQueries, $model->alias);