Controller:
$criteria=new CDbCriteria;
$criteria->compare('miembro.nombre','Ricardo',true);
$criteria->with=array(
'miembro'
);
$criteria->together = true;
$m = Miembro::model()->findAll($criteria);
$m return Array Empty
Model Miembro.php:
public function relations()
{
// NOTE: you may need to adjust the relation name and the related
// class name for the relations automatically generated below.
return array(
'miembro' => array(self::HAS_ONE, 'Miembro', 'id_escuela'),
);
}
I hope someone can help me…
Thx!