I am trying to get the cat_name depending to a article but I can ot manage it, what is wrong?
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array('cats'=>array(self::BELONGS_TO, 'cats', 'cat_id', ));
}
........
$dataProvider=new CActiveDataProvider('arts', array(
'pagination'=>array(
'pageSize'=>self::PAGE_SIZE,
),
),array('with'=>array('cats'),));
........
$this->widget('zii.widgets.grid.CGridView', array(
'dataProvider'=>$dataProvider,
'columns'=>array(
array('name'=>'cat_id',value=>$data->cats->cat_name),
....