Commit 2d7f7691 authored by Jonathan H. Wage's avatar Jonathan H. Wage

[DDC-603] Fixing issue with reverse engineering a database where table names are all caps

parent 79d3f655
...@@ -60,7 +60,7 @@ class DatabaseDriver implements Driver ...@@ -60,7 +60,7 @@ class DatabaseDriver implements Driver
public function loadMetadataForClass($className, ClassMetadataInfo $metadata) public function loadMetadataForClass($className, ClassMetadataInfo $metadata)
{ {
$tableName = $className; $tableName = $className;
$className = Inflector::classify($tableName); $className = Inflector::classify(strtolower($tableName));
$metadata->name = $className; $metadata->name = $className;
$metadata->table['name'] = $tableName; $metadata->table['name'] = $tableName;
...@@ -153,7 +153,9 @@ class DatabaseDriver implements Driver ...@@ -153,7 +153,9 @@ class DatabaseDriver implements Driver
$classes = array(); $classes = array();
foreach ($this->_sm->listTables() as $table) { foreach ($this->_sm->listTables() as $table) {
$classes[] = $table->getName(); // TODO: Why is this not correct? Inflector::classify($table->getName()); // This method must return an array of table names because we need
// to know the table name after we inflect it to create the entity class name.
$classes[] = $table->getName();
} }
return $classes; return $classes;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment