check whether the value of defaultConnection have been set or not
This commit is contained in:
parent
8d8cc7be79
commit
301df4331c
|
@ -38,8 +38,12 @@ class PropelExtension extends Extension
|
||||||
|
|
||||||
if (1 === count($config['database']['connections'])) {
|
if (1 === count($config['database']['connections'])) {
|
||||||
$defaultConnection = array_keys($config['database']['connections'])[0];
|
$defaultConnection = array_keys($config['database']['connections'])[0];
|
||||||
$config['runtime']['defaultConnection'] = $defaultConnection;
|
if (!isset($config['runtime']['defaultConnection'])) {
|
||||||
$config['generator']['defaultConnection'] = $defaultConnection;
|
$config['runtime']['defaultConnection'] = $defaultConnection;
|
||||||
|
}
|
||||||
|
if (!isset($config['generator']['defaultConnection'])) {
|
||||||
|
$config['generator']['defaultConnection'] = $defaultConnection;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$container->setParameter('propel.logging', $config['runtime']['logging']);
|
$container->setParameter('propel.logging', $config['runtime']['logging']);
|
||||||
|
|
Loading…
Reference in a new issue