Just a minor improvement: To be consistent with the note in the Yii guide, the created CRUD classes should also use CamelCase in the relations example:
public function relations()
{
return array(
'author'=>array(self::BELONGS_TO, 'User', 'authorId'),
'comments'=>array(self::HAS_MANY, 'Comment', 'postId', 'with'=>'author', 'order'=>'createTime DESC'),
'tags'=>array(self::MANY_MANY, 'Tag', 'postTag(postId, tagId)', 'order'=>'name'),
);
}