Skip to content
This repository

Oracle listsources fix #712

merged 2 commits into from almost 2 years ago

4 participants

Michael Nitschinger José Lorenzo Rodríguez Ben Murden Christopher Vrooman
Michael Nitschinger
daschl commented July 11, 2012

...rride each other.

Fixes #3026

José Lorenzo Rodríguez lorenzo merged commit 57106b1 into from July 11, 2012
José Lorenzo Rodríguez lorenzo closed this July 11, 2012
José Lorenzo Rodríguez


Christopher Vrooman

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

Showing 2 unique commits by 1 author.

Jul 11, 2012
Michael Nitschinger Datasource: This fixes an issue where the tables for different users …
…override each other.
Michael Nitschinger Datasources: one more change here so that the correct columns are sel…
…ected and not from the global table namespace.
This page is out of date. Refresh to see the latest.
4  cake/libs/model/datasources/dbo/dbo_oracle.php
@@ -467,7 +467,7 @@ function listSources() {
467 467
 		if ($cache != null) {
468 468
 			return $cache;
469 469
-		$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';
471 471
472 472
 		if (!$this->execute($sql)) {
473 473
 			return false;
@@ -503,7 +503,7 @@ function describe(&$model) {
503 503
 			return $cache;
504 504
505 505
-		$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 = \'';
507 507
 		$sql .= strtoupper($this->fullTableName($model)) . '\'';
508 508
509 509
 		if (!$this->execute($sql)) {

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.