Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.2.0
-
Fix Version/s: 1.2.2
-
Component/s: Schema Files
-
Labels:None
-
Environment:PHP 5.2.4-2ubuntu5.9 with Suhosin-Patch 0.9.6.2 (cli) (built: Nov 26 2009 14:00:44)
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
Oracle database 10gR2
Symfony 1.4.1
Description
Sometimes the ORACLE engine has object names that are not tables, and the doctrine generator tries to
generate classes for them, the following patch solves the problem.
[Solution found thanks to Vladimir Tamara - vtamara AT pasosdejesus DOT org]
diff -u Doctrine/Import/Oracle.php.orig Doctrine/Import/Oracle.php
--- Doctrine/Import/Oracle.php.orig 2010-01-07 17:08:33.000000000
-0500
+++ Doctrine/Import/Oracle.php 2010-01-07 17:08:54.000000000 -0500
@@ -203,7 +203,7 @@
*/
public function listTables($database = null)
{
- $query = "SELECT * FROM user_objects WHERE object_type =
'TABLE'";
+ $query = "SELECT * FROM user_objects WHERE object_type =
'TABLE' and object_name in (select table_name from user_tables)";
return $this->conn->fetchColumn($query);
}
@@ -252,4 +252,4 @@
$query = 'SELECT view_name FROM sys.user_views';
return $this->conn->fetchColumn($query);
}
-}
\ No newline at end of file
+}
Activity
Andres Molina
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Environment |
PHP 5.2.4-2ubuntu5.9 with Suhosin-Patch 0.9.6.2 (cli) (built: Nov 26 2009 14:00:44) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies Oracle database 10gR2 |
PHP 5.2.4-2ubuntu5.9 with Suhosin-Patch 0.9.6.2 (cli) (built: Nov 26 2009 14:00:44) Copyright (c) 1997-2007 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies Oracle database 10gR2 Symfony 1.4.1 |
Jonathan H. Wage
made changes -
| Description |
Sometimes the ORACLE engine has object names that are not tables, and the doctrine generator tries to generate classes for them, the following patch solves the problem. [Solution found thanks to Vladimir Tamara - vtamara AT pasosdejesus DOT org] diff -u Doctrine/Import/Oracle.php.orig Doctrine/Import/Oracle.php --- Doctrine/Import/Oracle.php.orig 2010-01-07 17:08:33.000000000 -0500 +++ Doctrine/Import/Oracle.php 2010-01-07 17:08:54.000000000 -0500 @@ -203,7 +203,7 @@ */ public function listTables($database = null) { - $query = "SELECT * FROM user_objects WHERE object_type = 'TABLE'"; + $query = "SELECT * FROM user_objects WHERE object_type = 'TABLE' and object_name in (select table_name from user_tables)"; return $this->conn->fetchColumn($query); } @@ -252,4 +252,4 @@ $query = 'SELECT view_name FROM sys.user_views'; return $this->conn->fetchColumn($query); } -} \ No newline at end of file +} |
Sometimes the ORACLE engine has object names that are not tables, and the doctrine generator tries to generate classes for them, the following patch solves the problem. [Solution found thanks to Vladimir Tamara - vtamara AT pasosdejesus DOT org] diff -u Doctrine/Import/Oracle.php.orig Doctrine/Import/Oracle.php {code} --- Doctrine/Import/Oracle.php.orig 2010-01-07 17:08:33.000000000 -0500 +++ Doctrine/Import/Oracle.php 2010-01-07 17:08:54.000000000 -0500 @@ -203,7 +203,7 @@ */ public function listTables($database = null) { - $query = "SELECT * FROM user_objects WHERE object_type = 'TABLE'"; + $query = "SELECT * FROM user_objects WHERE object_type = 'TABLE' and object_name in (select table_name from user_tables)"; return $this->conn->fetchColumn($query); } @@ -252,4 +252,4 @@ $query = 'SELECT view_name FROM sys.user_views'; return $this->conn->fetchColumn($query); } -} \ No newline at end of file +} {code} |
Jonathan H. Wage
made changes -
| Status | Open [ 1 ] | Closed [ 6 ] |
| Fix Version/s | 1.2.2 [ 10047 ] | |
| Resolution | Fixed [ 1 ] |