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:
@@ -110,9 +110,10 @@ class modelGenerator
|
|||||||
}
|
}
|
||||||
$f .= " ));\n\n";
|
$f .= " ));\n\n";
|
||||||
$f .= " // The primary key\n";
|
$f .= " // The primary key\n";
|
||||||
$f .= " \$this->primary (\"".$schema["primary"]."\");\n\n";
|
$f .= " \$this->primary (\"".$schema["primary"]."\");\n";
|
||||||
if (count ($schema["unique"]))
|
if (count ($schema["unique"]))
|
||||||
{
|
{
|
||||||
|
$f .= "\n";
|
||||||
$f .= " // The unique constraints\n";
|
$f .= " // The unique constraints\n";
|
||||||
$f .= " \$this->unique (array (\n";
|
$f .= " \$this->unique (array (\n";
|
||||||
foreach ($schema["unique"] as $unique)
|
foreach ($schema["unique"] as $unique)
|
||||||
@@ -130,9 +131,10 @@ class modelGenerator
|
|||||||
{
|
{
|
||||||
$f .= " \"$field\" => _(\"$field\"),\n";
|
$f .= " \"$field\" => _(\"$field\"),\n";
|
||||||
}
|
}
|
||||||
$f .= " );\n\n";
|
$f .= " );\n";
|
||||||
if (count ($schema["foreign"]))
|
if (count ($schema["foreign"]))
|
||||||
{
|
{
|
||||||
|
$f .= "\n";
|
||||||
$f .= " // The foreign constraints\n";
|
$f .= " // The foreign constraints\n";
|
||||||
$f .= " \$this->foreign = array (\n";
|
$f .= " \$this->foreign = array (\n";
|
||||||
foreach ($schema["foreign"] as $field=>$params)
|
foreach ($schema["foreign"] as $field=>$params)
|
||||||
|
|||||||
Reference in New Issue
Block a user