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