Commit 3048620a authored by Jonathan.Wage's avatar Jonathan.Wage

Fixes for buildingsql and generating models.

parent cfb45de5
...@@ -49,6 +49,11 @@ class Doctrine_Cli_Task_GenerateSql extends Doctrine_Cli_Task ...@@ -49,6 +49,11 @@ class Doctrine_Cli_Task_GenerateSql extends Doctrine_Cli_Task
throw new Doctrine_Cli_Exception('Invalid sql path.'); 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);
} }
} }
\ No newline at end of file
...@@ -397,12 +397,12 @@ END; ...@@ -397,12 +397,12 @@ END;
$className = $options['className']; $className = $options['className'];
$extends = isset($options['inheritance']['extends']) ? $options['inheritance']['extends']:'Doctrine_Record'; $extends = isset($options['inheritance']['extends']) ? $options['inheritance']['extends']:'Doctrine_Record';
if (isset($options['no_definition']) && $options['no_definition'] === false) { if (!(isset($options['no_definition']) && $options['no_definition'] === true)) {
$definition = null;
$setUp = null;
} else {
$definition = $this->buildTableDefinition($options, $columns, $relations, $indexes); $definition = $this->buildTableDefinition($options, $columns, $relations, $indexes);
$setUp = $this->buildSetUp($options, $columns, $relations); $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; $accessors = (isset($options['generate_accessors']) && $options['generate_accessors'] === true) ? $this->buildAccessors($options, $columns):null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment