I'm using Yii with Yii-Bootstrap for the widgets. My Models are generated via Gii. I have a simple database like this
video <-> video_tag <-> tag
and I want to set the tags of a video using the following widget in the video form:
$form->checkBoxListRow($model, 'tags', CHtml::listData(Tag::model()->findAll()));
This gives me the following error, when I try to edit a video, that already has tags in video_tag
Object of class Tag could not be converted to int
The Model seems to be generated correctly
'tags' => array(self::MANY_MANY, 'Tag', 'video_tag(video_id, tag_id)'),
Am I doing something wrong, or is there a general problem with many-to-many relations in CHtml, or checkBoxListRow?