Supplier Model:
'supplier_region'=>array(self::BELONGS_TO, 'Town', 'supplier_town'),
supplier_town is an integer value, which will link to Town.id so that I can retreive Town.region
In my controller I have:
$model=new Supplier('search');
$model->with('supplier_region');But I'm having trouble accessing the relation in a CGridView, I tried the following:
array( 'name'=>'supplier_region', 'value'=>$model->supplier_region->region, ),
But it did not seem to work. I'm not sure if I have done this correctly so could do with some assistance.

Help













