Cactivedataprovider And Right Join Issue


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

I found some similar but there is no answer.

I have action in Controller:

$devicesDataProvider = new CActiveDataProvider('Device', 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!