Blog Demo: why don't you create a PostTag model?

I was studing yii and looking at the blog's example.

I noticed that we have Tag, Post, Comment and User models and Post, Comment crud.

I was looking at Post.php model class. And i noticed that you used raw SQL statements and execute them with the database connection to manipulate PostTag table.

My question is: why don't you create a PostTag model? Which are the reasons?

I’m trying to understand the strucuture of Yii and the best behaviour to apply :)

Thank you very much, if you some more hints you are welcome :)

Indeed, creating a PostTag model would save us from writing those raw SQLs. On the other hand, we didn't create PostTag mainly for the purpose to show how to use raw SQLs together with AR.

Ok, this was the first reason i thought :)

Anyway, create a model for PostTag isn't stupid, right?

Is there some overhead becouse of that model has only to delete and insert?

Very little overhead.

thank you very much for the fast answers :)

I like very much this frameworks and the help that you’re giving to the developers :)