with (LEFT JOIN)

i have this code:


$existeEncomenda=$ritmo->with('encomendaLinhas')->findAll(array(

				'condition' => 'encomenda = '.Yii::app()->session['encomenda']));


				if ($existeEncomenda!=null){

But the with method give me a left join,i want a inner join ,how can achieve that with CActiveRecord

You need to use the joinType option when setting up the relation:

http://www.yiiframework.com/doc/api/1.1/CActiveRecord#relations-detail