From 421777caff9e5c29f33232be0ec7cedc04718792 Mon Sep 17 00:00:00 2001 From: Artem Stepin Date: Mon, 26 Sep 2016 15:57:54 +0200 Subject: [PATCH 1/2] Update OraclePlatform.php The table "all_col_comments" contains all column comments for all database tables in all tablespaces. If the connection user has access to multiple tablespaces, this query fails with the following error: ORA-01427: single-row subquery returns more than one row --- lib/Doctrine/DBAL/Platforms/OraclePlatform.php | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php index ac415b2d2a0..231a0bec856 100644 --- a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php @@ -674,6 +674,7 @@ public function getListTableColumnsSQL($table, $database = null) FROM $colCommentsTableName d WHERE d.TABLE_NAME = c.TABLE_NAME AND d.COLUMN_NAME = c.COLUMN_NAME + AND d.OWNER = c.OWNER ) AS comments FROM $tabColumnsTableName c WHERE c.table_name = " . $table . " $ownerCondition From 6af83fee229847278408bb786f3e0a275e4779cb Mon Sep 17 00:00:00 2001 From: Artem Stepin Date: Mon, 26 Sep 2016 16:29:18 +0200 Subject: [PATCH 2/2] Update OraclePlatformTest.php --- tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php b/tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php index 57b88b7617b..a9fdbc2ad78 100644 --- a/tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php +++ b/tests/Doctrine/Tests/DBAL/Platforms/OraclePlatformTest.php @@ -727,6 +727,7 @@ public function getReturnsGetListTableColumnsSQL() FROM user_col_comments d WHERE d.TABLE_NAME = c.TABLE_NAME AND d.COLUMN_NAME = c.COLUMN_NAME + AND d.OWNER = c.OWNER ) AS comments FROM user_tab_columns c WHERE c.table_name = 'test' @@ -740,6 +741,7 @@ public function getReturnsGetListTableColumnsSQL() FROM user_col_comments d WHERE d.TABLE_NAME = c.TABLE_NAME AND d.COLUMN_NAME = c.COLUMN_NAME + AND d.OWNER = c.OWNER ) AS comments FROM user_tab_columns c WHERE c.table_name = 'test' @@ -753,6 +755,7 @@ public function getReturnsGetListTableColumnsSQL() FROM all_col_comments d WHERE d.TABLE_NAME = c.TABLE_NAME AND d.COLUMN_NAME = c.COLUMN_NAME + AND d.OWNER = c.OWNER ) AS comments FROM all_tab_columns c WHERE c.table_name = 'test' AND c.owner = 'SCOTT'