Ok, i want Username (field usuario from clients model)
So i modified "clientes.php" in models, and Added relationship…
/**
* @return array relational rules.
*/
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(
'idCliente' => array(self::HAS_MANY, 'usuariosDescargas', 'usuario')
);
}
Then modified usuariosDescargas.php and added relationships…
/**
* @return array relational rules.
*/
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(
'usuario' => array(self::BELONGS_TO, 'clientes', 'idCliente'),
'descarga' => array(self::BELONGS_TO, 'descargas', 'idDescarga')
);
}
But in manage list from usuariosDescargas i got empty field, from "usuario.usuario", i know i know i doing something wrong but, where??