我有两张桌子,1. Students
2.SrkParents.
学生模型中的关系是,
'srkParents' => array(self::HAS_MANY, 'SrkParents', 'studentID'),
SrkParents 模型中的关系是,
'student' => array(self::BELONGS_TO, 'Students', 'studentID'),
观点是,
<?php $this->widget('zii.widgets.grid.CGridView', array(
'id'=>'students-grid',
'dataProvider'=>$dataProvider,
'filter'=>$model,
'columns'=>array('studentID','status','del',
array('name'=>'SrkParents.fathers_name',
'value'=>'$data->Students->fathers_name',
'type'=>'raw'),
array('class'=>'CButtonColumn',),),));
我不知道我在哪里做错了..我得到如下所示的错误,
Property "Students.Students" is not defined.