Hey,
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->unsetAttributes();
if(isset($_GET['WordList']))
$model->attributes=$_GET['WordList'];
$model->users->user = Yii::app()->user->getId();
$dataProvider = $model->search();
$this->render('myLists',array(
'dataProvider'=>$dataProvider,
'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.