diff --git a/src/Console/ModelsCommand.php b/src/Console/ModelsCommand.php index 963409b..97fa6c0 100644 --- a/src/Console/ModelsCommand.php +++ b/src/Console/ModelsCommand.php @@ -463,6 +463,7 @@ class ModelsCommand extends Command */ public function getPropertiesFromTable($model) { + $database = $model->getConnection()->getName(); $table = $model->getConnection()->getTablePrefix() . $model->getTable(); $schema = $model->getConnection()->getDoctrineSchemaManager(); $databasePlatform = $schema->getDatabasePlatform(); @@ -482,11 +483,6 @@ class ModelsCommand extends Command $databasePlatform->registerDoctrineTypeMapping($yourTypeName, $doctrineTypeName); } - $database = null; - if (strpos($table, '.')) { - [$database, $table] = explode('.', $table); - } - $columns = $schema->listTableColumns($table, $database); if (!$columns) {