commit
91e930fedc
|
@ -168,7 +168,7 @@ EOT
|
|||
return -1;
|
||||
}
|
||||
|
||||
$connectionName = $input->getOption('connection');
|
||||
$connectionName = $input->getOption('connection') ?: $this->getDefaultConnection();
|
||||
|
||||
if ('yml' === $type) {
|
||||
$loader = $this->getContainer()->get('propel.loader.yaml');
|
||||
|
|
|
@ -146,8 +146,8 @@ abstract class AbstractDataHandler
|
|||
{
|
||||
$searchPath = array();
|
||||
|
||||
if (!empty($this->datasources[$connectionName]['connection']['model_paths'])) {
|
||||
$modelPaths = $this->datasources[$connectionName]['connection']['model_paths'];
|
||||
if (!empty($this->datasources['database']['connections'][$connectionName]['model_paths'])) {
|
||||
$modelPaths = $this->datasources['database']['connections'][$connectionName]['model_paths'];
|
||||
foreach ($modelPaths as $modelPath) {
|
||||
$searchPath[] = $this->getRootDir() . '/../' . $modelPath;
|
||||
}
|
||||
|
|
|
@ -122,6 +122,7 @@ class Configuration extends PropelConfiguration
|
|||
->useAttributeAsKey('id')
|
||||
->prototype('array')
|
||||
->fixXmlConfig('slave')
|
||||
->fixXmlConfig('model_path')
|
||||
->children()
|
||||
->scalarNode('classname')->defaultValue($this->debug ? '\Propel\Runtime\Connection\DebugPDO' : '\Propel\Runtime\Connection\ConnectionWrapper')->end()
|
||||
->scalarNode('adapter')
|
||||
|
@ -158,6 +159,10 @@ class Configuration extends PropelConfiguration
|
|||
->booleanNode('ATTR_EMULATE_PREPARES')->defaultFalse()->end()
|
||||
->end()
|
||||
->end()
|
||||
->arrayNode('model_paths')
|
||||
->defaultValue(['src', 'vendor'])
|
||||
->prototype('scalar')->end()
|
||||
->end()
|
||||
->arrayNode('settings')
|
||||
->fixXmlConfig('query', 'queries')
|
||||
->children()
|
||||
|
|
Loading…
Reference in a new issue