I have two models in Phalcon .I am getting the model object of the first model using the Placon Model::find()
.
The problem is I cannot get model object which has an one to one relation with the first model.
I have tried everthing given in Phalcon tutorial.
Gave hasone in first Model on initialize
public function initialize()
{
$this->hasOne("emp_id", "Employee", "emp_id");
}
Where emp_id is the primary key of Employee table and Foreign key in Salary table, which is my second model.