parameterized scope and inner join

Hi all,

I do this :




$comptes = 

                    ProfilUser::model()->findAll(

                            array(

                                    'with'=>array(

                                            'owner',

                                            'infosAdmin'=>array(

                                                'scopes'=>array( 'elapsed'=>$date)

                                            )

                                        )

                                    )

                    );



and in a related model (not in UserProfil)




    public function elapsed($dateToday) {

        

        $this->getDbCriteria()->mergeWith(

            array(

            'join'=>'inner join',

            'condition'=>"date_renouvellement <= :date",

            'params' => array(':date'=>$dateToday),

        ));

        return $this;

    }



Well This code produces a bad SQL request:





SELECT `t`.`id` AS `t0_c0`, `t`.`nom` AS `t0_c1`

FROM `tbl_profil_user` `t` LEFT OUTER JOIN `tbl_user` `owner` ON (`owner`.`id`=`t`.`id`) 

LEFT OUTER JOIN `tbl_profil_compte` `infosAdmin` ON (`infosAdmin`.`user_id`=`t`.`id`) AND (date_renouvellement <= :date) inner join. Bound with : 



I would expect that Inner join replaces the Left Outer join, nut not …

Maybe I misunderstood something but I do another request with using scope (not parameterized and with inner join, and it worked well)

Have you an idea of what is wrong ?

thanks