Merge pull request #309 from K-Phoen/infer-default-connection
Fix default connection detection when not explicitly set in the config
This commit is contained in:
commit
1701a4e67d
2 changed files with 3 additions and 2 deletions
|
|
@ -354,7 +354,7 @@ abstract class AbstractCommand extends ContainerAwareCommand
|
|||
{
|
||||
$config = $this->getContainer()->getParameter('propel.configuration');
|
||||
|
||||
return $config['generator']['defaultConnection'];
|
||||
return !empty($config['generator']['defaultConnection']) ? $config['generator']['defaultConnection'] : key($config['database']['connections']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue