modelGenerator: Add the foreign keys objects in the constructor
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3814 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -169,8 +169,9 @@ class modelGenerator
|
|||||||
$path = "";
|
$path = "";
|
||||||
foreach ($schema["foreign"] as $field=>$params)
|
foreach ($schema["foreign"] as $field=>$params)
|
||||||
{
|
{
|
||||||
$f .= " \$this->foreign_$field = new $path$field ();\n";
|
$objName = $params[0];
|
||||||
$f .= " \$this->setForeignObj (\$this->foreign_$field);\n";
|
$f .= " \$this->foreign_$objName = new $path$objName ();\n";
|
||||||
|
$f .= " \$this->setForeignObj (\$this->foreign_$objName);\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user