{"record":{"id":"3f0a7ed1351f8448","repo":"phalcon/cphalcon","slug":"resultset-row-class-classname-must-be-a-subcla","errorCode":null,"errorMessage":"Resultset row class '{className}' must be a subclass of Phalcon\\Mvc\\Model\\Row","messagePattern":"Resultset row class '(.+?)' must be a subclass of Phalcon\\\\Mvc\\\\Model\\\\Row","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\Query\\Exceptions\\InvalidResultsetRowClass","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model/Query.zep","lineNumber":839,"sourceCode":"    {\n        let this->type = type;\n\n        return this;\n    }\n\n    /**\n     * Sets the class used to hydrate rows that are not mapped to a model\n     * (custom columns/joins). The class must be a subclass of\n     * Phalcon\\Mvc\\Model\\Row.\n     */\n    public function setResultsetRowClass(string resultsetRowClass) -> <QueryInterface>\n    {\n        if unlikely !class_exists(resultsetRowClass) {\n            throw new ResultsetRowClassNotFound(resultsetRowClass);\n        }\n\n        if unlikely !is_subclass_of(resultsetRowClass, Row::class) {\n            throw new InvalidResultsetRowClass(resultsetRowClass);\n        }\n\n        let this->resultsetRowClass = resultsetRowClass;\n\n        return this;\n    }\n\n    /**\n     * Tells to the query if only the first row in the resultset must be\n     * returned\n     */\n    public function setUniqueRow(bool uniqueRow) -> <QueryInterface>\n    {\n        let this->uniqueRow = uniqueRow;\n\n        return this;\n    }\n","sourceCodeStart":821,"sourceCodeEnd":857,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model/Query.zep#L821-L857","documentation":"Error \"Resultset row class '{className}' must be a subclass of Phalcon\\Mvc\\Model\\Row\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model/Query.zep:839 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"}