我有2種型號:項目,並與(user.php的)連接的用戶:Yii的CActiveDataProvider MANY :: MANY
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
"projects"=>array(self::MANY_MANY, 'Project','projects_users(user_id, project_id)'),
);
}
我想表明在CActiveDataProvider誰是不與項目有關的所有用戶。我該怎麼做?
有很多的在網上的例子如何做到這一點。看看這裏例如:http://www.yiiframework.com/forum/index.php/topic/12637-please-explain-how-to-do-many-to-many-relationships-for-newcomer/ –
我無法找到任何解決方案 – rafal235