Dear Yii-Team and Friends, many thanks for this great framework.
We use MySQL-MyIsam and there is no relation information in the database (in comparison to innodb).
That’is the Situation:
4808
I can successfully create Model and CRUD for a single table but I don’t currently know, how to add the relation information manually into my model, (if applicable -->) so that I can update more than one table or get data for a column from another table, during creating forms.
Can you please help me, the relations between 1 to 4 would be quite sufficient, i can then manage the rest on my own.
It is an extension to Gii and will make it so that your model extends a base model. This way your base model can be regenerated without affecting any custom code in the main model.
These changes has no effects, if I modify the Models and let create the crud-forms, there are no changes and die geburtstagsland_id (= birth land) has no Data from list_land table:
Model KindBasis.php (excerpt)
class KindBasis extends CActiveRecord
{
...
public function relations()
{
return array(
'geburtsland_id'=>array(self::BELONGS_TO, 'liste_land', 'iso'),
);
}
...
}
Model ListeLand.php
class ListeLand extends CActiveRecord
{
...
public function relations()
{
return array(
'iso'=>array(self::HAS_MANY, 'kind_basis', 'geburtsland_id'),
);
}
...
}