I am trying to create a query like
SELECT *
FROM course
where course.id IN(
SELECT DISTINCT(course_id)
FROM course_timing tim
WHERE tim.date >= CURDATE()
)
I have set the model manger
$di->set('modelsManager', function() {
return new Phalcon\Mvc\Model\Manager();
});
But when I try to use
$phql = "SELECT * FROM CourseTiming";
$rows = $this->modelsManager->executeQuery($phql);
I am getting
Model 'CourseTiming' could not be loaded
Or is there any way to run the above query using Model::find etc