{"record":{"id":"b9eeb494612c2149","repo":"phalcon/cphalcon","slug":"model-name-must-be-string","errorCode":null,"errorMessage":"Model name must be string","messagePattern":"Model name must be string","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\Exceptions\\InvalidModelName","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model/Criteria.zep","lineNumber":308,"sourceCode":"     */\n    public function eager(array paths) -> <Criteria>\n    {\n        let this->params[\"eager\"] = paths;\n\n        return this;\n    }\n\n    /**\n     * Executes a find using the parameters built with the criteria\n     */\n    public function execute() -> <ResultsetInterface>\n    {\n        var model;\n\n        let model = this->getModelName();\n\n        if unlikely typeof model != \"string\" {\n            throw new InvalidModelName();\n        }\n\n        return {model}::find(\n            this->getParams()\n        );\n    }\n\n    /**\n     * Adds the \"for_update\" parameter to the criteria\n     */\n    public function forUpdate(bool forUpdate = true) -> <CriteriaInterface>\n    {\n        let this->params[\"for_update\"] = forUpdate;\n\n        return this;\n    }\n\n    /**","sourceCodeStart":290,"sourceCodeEnd":326,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model/Criteria.zep#L290-L326","documentation":"Error \"Model name must be string\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model/Criteria.zep:308 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}