Setting:
$dataProvider = new CActiveDataProvider('Companies');
will yield all the Companies including the MANY_MANY model relationships with Telephones and Emails.
However, when I set a criteria to select some columns instead of the whole table it will only yield one result.
What should I change in order to get all the companies with the selected information?
$criteria->with = array('companyTelephones'=>array('select'=>'telephone_id,telephone_type,telephone_number,telephone_number_extension','scopes'=>'live'), 'companyEmails'=>array('select'=>'email_id,email_type,email_address','scopes'=>'live'));