Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Oracle listsources fix #712

Merged
merged 2 commits into from

4 participants

@daschl

...rride each other.

Fixes #3026

@lorenzo lorenzo merged commit 57106b1 into from
@lorenzo
Owner

Thanks!

@cdvrooman

This change causes an issue where I have been granted access to tables from different schemas and I cannot access them because they are not "mine". Would it be possible to add a configuration toggle where the global or user table namespace could be chosen for the connection at the discretion of the developer?

The other related commit, fb31146, would also have to be added to such a change.

@cdvrooman You can see my commit and pull request at #123 for this. It was not merged (I think the reason was that it was complex and other developers didn't have an Oracle testing environment), but it also supports caching, which the base driver doesn't, and comes with unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 11, 2012
  1. @daschl
  2. @daschl

    Datasources: one more change here so that the correct columns are sel…

    daschl authored
    …ected and not from the global table namespace.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 cake/libs/model/datasources/dbo/dbo_oracle.php
View
4 cake/libs/model/datasources/dbo/dbo_oracle.php
@@ -467,7 +467,7 @@ function listSources() {
if ($cache != null) {
return $cache;
}
- $sql = 'SELECT view_name AS name FROM all_views UNION SELECT table_name AS name FROM all_tables';
+ $sql = 'SELECT view_name AS name FROM user_views UNION SELECT table_name AS name FROM user_tables';
if (!$this->execute($sql)) {
return false;
@@ -503,7 +503,7 @@ function describe(&$model) {
return $cache;
}
- $sql = 'SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM all_tab_columns WHERE table_name = \'';
+ $sql = 'SELECT COLUMN_NAME, DATA_TYPE, DATA_LENGTH FROM user_tab_columns WHERE table_name = \'';
$sql .= strtoupper($this->fullTableName($model)) . '\'';
if (!$this->execute($sql)) {
Something went wrong with that request. Please try again.