Ticket #2332 (closed defect: fixed)
Oracle relationships fail when being generated from schema
| Reported by: | coolaj86 | Owned by: | jwage |
|---|---|---|---|
| Priority: | major | Milestone: | 1.0.11 |
| Component: | Attributes | Version: | 1.1.2 |
| Severity: | abc | Keywords: | |
| Cc: | Has Test: | no | |
| Status: | Pending Core Response | Has Patch: | yes |
Description
My Oracle DDL: http://pastebin.com/f755003d8
What happens when I put in a print_r before the exception and and run Doctrine::generateModelsFromDb('models_new'):
Array
(
[relations] => Array
(
[Computer] => Array
(
[type] => 1
[alias] => Computer
[class] => Computer
[local] => COMPUTER_ID
[foreign] => ID
)
)
)
Fatal error: Uncaught exception 'Doctrine_Import_Builder_Exception' with message 'Missing class name.' in /home/hhpsprogrammer/Code/Doctrine-1.1.2-Sandbox/lib/Doctrine/Import/Builder.php:994
Stack trace:
#0 /home/hhpsprogrammer/Code/Doctrine-1.1.2-Sandbox/lib/Doctrine/Import.php(437): Doctrine_Import_Builder->buildRecord(Array)
#1 /home/sfprojects/Code/Doctrine-1.1.2-Sandbox/lib/Doctrine.php(704): Doctrine_Import->importSchema('models_new', Array, Array)
#2 /home/sfprojects/Code/Doctrine-1.1.2-Sandbox/test.php(4): Doctrine::generateModelsFromDb('models_new')
#3 {main}
thrown in /home/sfprojects/Code/Doctrine-1.1.2-Sandbox/lib/Doctrine/Import/Builder.php on line 994
If I comment out the throw Exception statement and put an empty return instead it seems to work well enough. I just don't get why it's making the same relation over and over and over again.
Array
(
[relations] => Array
(
[DeptTbl] => Array
(
[type] => 1
[alias] => DeptTbl
[class] => DeptTbl
[local] => DEPARTMENT_ID
[foreign] => DEPARTMENT_ID
)
[DeptTbl_8] => Array
(
[type] => 1
[alias] => DeptTbl_8
[class] => DeptTbl
[local] => DEPARTMENT_ID
[foreign] => ID
)
[DeptTbl_13] => Array
(
[type] => 1
[alias] => DeptTbl_13
[class] => DeptTbl
[local] => DEPARTMENT_ID
[foreign] => DEPT_ID
)
)
)
Array
(
[relations] => Array
(
[DeptTbl] => Array
(
[type] => 1
[alias] => DeptTbl
[class] => DeptTbl
[local] => DEPARTMENT_ID
[foreign] => DEPARTMENT_ID
)
[DeptTbl_9] => Array
(
[type] => 1
[alias] => DeptTbl_9
[class] => DeptTbl
[local] => DEPARTMENT_ID
[foreign] => ID
)
[DeptTbl_14] => Array
(
[type] => 1
[alias] => DeptTbl_14
[class] => DeptTbl
[local] => DEPARTMENT_ID
[foreign] => DEPT_ID
)
)
)
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
