Relational Query Without Getting Related Models Doesn't Work


Referring to this guide, I tried the following:

  $users = new CActiveDataProvider('User', array(

         'criteria' => array(

            'condition' => 't.status = ' . User::STATUS_ACTIVE . " AND <> ''",

            'with' => array('profile', '', 'videos' => array('select'=>false, 'joinType'=>'INNER JOIN')),

            'order' => 't.create_at DESC',



but it doesn’t work, it displays all users even if the user doesn’t have any videos. What I want is to display only users who have some videos. Is there something that I missed here?


Solved. Need to add ‘together’ option.