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.');
|
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'];
|
$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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user