Preferred way to enter table data for MANY_MANY relations

Regarding Yii’s Relational Active Record Guide, what is the proper or preferred method of getting data into the tbl_post_category table?

Should this be done manually through a query, or in some object oriented way?

I wish I could answer your question

why not try this