Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding table prefix detection for sequence maps in DboOracle::describ…

…e(). Fixes #6527.

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8268 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
commit 5172035e0245f62258f537f82bbf793587d364b1 1 parent 887f833
@jperras jperras authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 cake/libs/model/datasources/dbo/dbo_oracle.php
View
7 cake/libs/model/datasources/dbo/dbo_oracle.php
@@ -465,11 +465,12 @@ function listSources() {
* @access public
*/
function describe(&$model) {
+ $table = $model->fullTableName($model, false);
if (!empty($model->sequence)) {
- $this->_sequenceMap[$model->table] = $model->sequence;
+ $this->_sequenceMap[$table] = $model->sequence;
} elseif (!empty($model->table)) {
- $this->_sequenceMap[$model->table] = $model->table . '_seq';
+ $this->_sequenceMap[$table] = $model->table . '_seq';
}
$cache = parent::describe($model);
@@ -477,12 +478,14 @@ function describe(&$model) {
if ($cache != null) {
return $cache;
}
+
$sql = 'SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = \'';
$sql .= strtoupper($this->fullTableName($model)) . '\'';
if (!$this->execute($sql)) {
return false;
}
+
$fields = array();
for ($i = 0; $row = $this->fetchRow(); $i++) {
Please sign in to comment.
Something went wrong with that request. Please try again.