{"record":{"id":"92b29bbbc03730ae","repo":"phalcon/cphalcon","slug":"resultset-row-class-classname-not-found","errorCode":null,"errorMessage":"Resultset row class '{className}' not found","messagePattern":"Resultset row class '(.+?)' not found","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\Query\\Exceptions\\ResultsetRowClassNotFound","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model/Query.zep","lineNumber":835,"sourceCode":"    /**\n     * Sets the type of PHQL statement to be executed\n     */\n    public function setType(int type) -> <QueryInterface>\n    {\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;","sourceCodeStart":817,"sourceCodeEnd":853,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model/Query.zep#L817-L853","documentation":"Query::setResultsetRowClass() checks class_exists() on the supplied row class; if the class is not loaded/autoloable, ResultsetRowClassNotFound is thrown. The faulty input is the resultsetRowClass string — a typo or a class outside the autoloaded namespaces.","triggerScenarios":"Thrown at phalcon/Mvc/Model/Query.zep:835 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use the fully-qualified class name of an existing Row subclass","Register the class's namespace with the autoloader","Fix typos in the class name string"],"exampleFix":"$query->setResultsetRowClass(MyRow::class); // must extend Phalcon\\Mvc\\Model\\Row","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use ::class constants instead of string literals","Ensure custom row classes live in autoloaded directories"],"tags":[],"backgroundTag":null,"analyzedSha":"b7419de9cd0a8a3f48441ead84c9f8415d463e25","analyzedAt":"2026-08-21T06:21:18.811Z","contentChangedAt":"2026-08-21T06:21:18.811Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}