Commit 3b0f749a authored by Jonathan.Wage's avatar Jonathan.Wage

Fixes for multiple connection handling.

parent 7bbcb51d
......@@ -185,17 +185,21 @@ class Doctrine_Import extends Doctrine_Connection_Module
*/
public function importSchema($directory, array $databases = array())
{
$builder = new Doctrine_Import_Builder();
$builder->setTargetPath($directory);
$connections = Doctrine_Manager::getInstance()->getConnections();
foreach ($connections as $connection) {
$builder = new Doctrine_Import_Builder();
$builder->setTargetPath($directory);
$classes = array();
foreach ($this->listTables() as $table) {
$builder->buildRecord(array('tableName' => $table,
'className' => Doctrine::classify($table)),
$this->listTableColumns($table),
array());
$classes = array();
foreach ($connection->import->listTables() as $table) {
$builder->buildRecord(array('tableName' => $table,
'className' => Doctrine::classify($table)),
$connection->import->listTableColumns($table),
array());
$classes[] = Doctrine::classify($table);
$classes[] = Doctrine::classify($table);
}
}
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