Cactivedataprovider And Right Join Issue

Hello,

I have a problem with data that gives me my CActiveDataProvider.

I found some similar soft-dev-pro.blogspot.com/2011/06/yii-right-join.html but there is no answer.

I have action in Controller:




$devicesDataProvider = new CActiveDataProvider('Device', array(

'criteria'=>array(

'condition'=>'"license"."customer_id"=\''.Yii::app()->user->customer_id.'\'',

'with'=>array(

'license'=>array(

'joinType'=>'RIGHT OUTER JOIN', ),

),

),

));



and view:


<?php $this->widget('zii.widgets.grid.CGridView', array( 'dataProvider' => $devicesDataProvider, ...

Checking the sql query, it gives me all the rows I need, including ones that have no rows in main table but have it in Licence table.

But the data provider dosn’t give me these rows. I want to use Device as a model but need some rows without actually device rows. Any ideas how to do this?

Thank you!