Thanks n-r for the reply but I wasn’t clear enough in my initial post. What I need is to do this in the “relations()” function in my model class that extends CActiveRecord i.e.
public function relations()
{
return array(
'author'=>array(self::BELONGS_TO, 'User', 'author_id'),
);
}