Model| Issue下我写了,
public function getProjectNumberList($pid)
{
$model = Machine::model()->findAllByAttributes(array('machine_sn'=>$pid));
return CHtml::listData($model, 'machine_sn', 'project_number');
}
在这个函数中我得到了machine_sn和project_number,但是project_number只是ID,不是name值
我需要的是
Model| Project中的project_number_name,
怎么用Modle|Issue下的relation实现?或者其他的方法也可以?