Hello guys,
I have:
<?php
namespace Midas\Models\Proccess;
use Phalcon\Mvc\Model;
class Proccess extends Model {
public $cod_processo;
public $nome;
public $data_criacao;
public function initialize() {
$this->setSource('proccess');
$this->hasMany("cod_processo", "\Midas\Models\Proccess\ProccessActivity", "cod_processo");
}
public function getSource() {
return 'proccess';
}
}
and
<?php
namespace Midas\Models\Proccess;
use Phalcon\Mvc\Model;
class ProccessActivity extends Model {
public $cod_atividade;
public $cod_processo;
public $nome;
public $cliente;
public $onde;
public $quando;
public $porque;
public $tempo;
public $como;
public $ordem;
public function initialize() {
$this->setSource('proccess_activity');
$this->hasMany("cod_atividade", "\Midas\Models\Proccess\ActivityResponsible", "cod_atividade");
$this->belongsTo("cod_processo", "\Midas\Models\Proccess\Proccess", "cod_processo");
}
public function getSource() {
return 'proccess_activity';
}
}
but I can not just recover:
$proccess = Proccess::findFirst($id);
$proccessActivity = $proccess->getProccessActivity();
following documentation: https://docs.phalcon.io/uk/latest/reference/models.html
i need help!!!! please!