class Post extends CActiveRecord
{
public function relations()
{
return array(
'categories'=>array(self::MANY_MANY, 'Category',
'tbl_post_category(post_id, category_id)'),
);
}
}
How I can add or remove relations between Post and Category models (entry in the tbl_post_category table) using my Post model class?