Hi there, I have following relations
Category HAS_MANY Post
Post HAS_ONE Category
Post HAS_ONE Location
Post HAS_MANY Image
In my actionView in CategoryController, I would like to load the Category model data and at the same time load the Post model data excluding the Location and Image model.
I noticed that even when I do a find; like the one below:
$model=Category::model()->findByPk($id);
It automatically loads the Location and Image model data that is related the Post as well.
How do I exclude them out on the fly?
Thank you.