Good morning people,
I'm trying to make a relationship with hasMany
and it is not working properly,
Model: Filial, Related Model: FilialContato
$this->hasMany(['filial_id','ImobiliariaId'], FilialContato::class, ['filial_id','imobiliaria_id'], ['alias' => 'FilialContato']);
I need both relationships to connect through "filial_id" and "ImobiliariaId"
In the log, it constructs the query correctly:
SELECT .... FROM .... WHERE filial_contato.filial_id = :APR0 AND filial_contato.imobiliaria_id = :APR1{
But the past variables are in trouble, the primary key of FilialContate filial_id
works, but ImobiliariaId does not, it returns NULL value, even if it is filled, and this happens with any other column I put there.
{"APR0":"10","APR1":null}
I've tried everything and I can not fix it, my version of Phalcon is 2.0.8