Hello fellows,
i just wanted to point out for someone who will come in the same trouble as me. I had previously a search function where i wanted to use 2 joins with "with" methods. So i wrote:
$criteria->with = array(‘departments’=>array(‘select’=>‘departments.id’,‘together’=>true));
$criteria->with = array(‘roles’=>array(‘select’=>‘roles.name’,‘together’=>true));
As i found today out, the right way to write "with" clause is as follows:
$criteria->with = array(‘departments’=>array(‘select’=>‘departments.id’,‘together’=>true),‘roles’=>array(‘select’=>‘roles.name’,‘together’=>true));
Hope it can help someone!
Have a nice day Yii#ers!