1
0
mirror of synced 2025-01-30 20:11:49 +03:00

Fixes for buildingsql and generating models.

This commit is contained in:
Jonathan.Wage 2007-10-15 15:01:54 +00:00
parent cfb45de519
commit 3048620a05
2 changed files with 10 additions and 5 deletions

View File

@ -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);
}
}

View File

@ -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;