I'm building a query with QueryBuilder, then using it as the data source for the Paginator, like so
$Builder = $this->modelsManager->createBuilder() ->from('\OB\Model\Request') ->orderBy('entered_date'); $Paginator = new \Phalcon\Paginator\Adapter\QueryBuilder([ "builder"=>$Builder, "limit"=>$this->config->pagination, "page"=>$page ]);
The exception being raised is:
Can't obtain the model 'entereddate' source from the _models list, when preparing: SELECT [\OB\Model\Request].* FROM [\OB\Model\Request] ORDER BY entereddate LIMIT 2
When I remove the
->orderBy("entered_date") clause, everything works fine. I know
entered_date is an actual property of the
\OB\Model\Request class because I can output it in my view. In fact, this exception gets raised regardless of the field name I order by.
Any idea what this exception means?