phalcon/cphalcon · error · Phalcon\Mvc\Model\Exceptions\InvalidModelName
Model name must be string
Error message
Model name must be string
What it means
Error "Model name must be string" thrown in phalcon/cphalcon.
Source
Thrown at phalcon/Mvc/Model/Criteria.zep:308
*/
public function eager(array paths) -> <Criteria>
{
let this->params["eager"] = paths;
return this;
}
/**
* Executes a find using the parameters built with the criteria
*/
public function execute() -> <ResultsetInterface>
{
var model;
let model = this->getModelName();
if unlikely typeof model != "string" {
throw new InvalidModelName();
}
return {model}::find(
this->getParams()
);
}
/**
* Adds the "for_update" parameter to the criteria
*/
public function forUpdate(bool forUpdate = true) -> <CriteriaInterface>
{
let this->params["for_update"] = forUpdate;
return this;
}
/**View on GitHub (pinned to b7419de9cd)
When it happens
Trigger: Thrown at phalcon/Mvc/Model/Criteria.zep:308 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21).
Data as JSON: /api/errors/b9eeb494612c2149.
Report an issue: GitHub.