Show Only Entries With Specific Relation


I have the tables "User" and "word_list" in my yii applictaion. They have the following relation:

'users' => array(self::MANY_MANY, 'User', 'subscription(word_list, user)')

I want to show only the word_lists which are subscripted from the current user.

I try the following:

	public function actionSubscriptLists()


		$model=new WordList('search');





		$model->users->user = Yii::app()->user->getId();

		$dataProvider = $model->search();




			'model' => $model




I get this error:

Indirect modification of overloaded property WordList::$users has no effect.

Would be cool if someone can give me an advice.


Please go through the wiki for relations definining inside Active record. It may be helpful.