Fixes for buildingsql and generating models.
This commit is contained in:
parent
cfb45de519
commit
3048620a05
@ -49,6 +49,11 @@ class Doctrine_Cli_Task_GenerateSql extends Doctrine_Cli_Task
|
||||
throw new Doctrine_Cli_Exception('Invalid sql path.');
|
||||
}
|
||||
|
||||
file_put_contents($path, implode("\n", $sql));
|
||||
$build = '';
|
||||
foreach ($sql as $query) {
|
||||
$build .= $query.";\n";
|
||||
}
|
||||
|
||||
file_put_contents($path, $build);
|
||||
}
|
||||
}
|
@ -397,12 +397,12 @@ END;
|
||||
$className = $options['className'];
|
||||
$extends = isset($options['inheritance']['extends']) ? $options['inheritance']['extends']:'Doctrine_Record';
|
||||
|
||||
if (isset($options['no_definition']) && $options['no_definition'] === false) {
|
||||
$definition = null;
|
||||
$setUp = null;
|
||||
} else {
|
||||
if (!(isset($options['no_definition']) && $options['no_definition'] === true)) {
|
||||
$definition = $this->buildTableDefinition($options, $columns, $relations, $indexes);
|
||||
$setUp = $this->buildSetUp($options, $columns, $relations);
|
||||
} else {
|
||||
$definition = null;
|
||||
$setUp = null;
|
||||
}
|
||||
|
||||
$accessors = (isset($options['generate_accessors']) && $options['generate_accessors'] === true) ? $this->buildAccessors($options, $columns):null;
|
||||
|
Loading…
x
Reference in New Issue
Block a user