modelGenerator: manage correctely the CR in missing sections

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3704 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-05-19 08:09:07 +00:00
parent dcf93e48a6
commit c4489dd2ad

View File

@@ -110,9 +110,10 @@ class modelGenerator
}
$f .= " ));\n\n";
$f .= " // The primary key\n";
$f .= " \$this->primary (\"".$schema["primary"]."\");\n\n";
$f .= " \$this->primary (\"".$schema["primary"]."\");\n";
if (count ($schema["unique"]))
{
$f .= "\n";
$f .= " // The unique constraints\n";
$f .= " \$this->unique (array (\n";
foreach ($schema["unique"] as $unique)
@@ -130,9 +131,10 @@ class modelGenerator
{
$f .= " \"$field\" => _(\"$field\"),\n";
}
$f .= " );\n\n";
$f .= " );\n";
if (count ($schema["foreign"]))
{
$f .= "\n";
$f .= " // The foreign constraints\n";
$f .= " \$this->foreign = array (\n";
foreach ($schema["foreign"] as $field=>$params)