phalcon/cphalcon · error · Phalcon\Mvc\Model\Query\Exceptions\InvalidResultsetRowClass

Resultset row class '{className}' must be a subclass of Phal

Error message

Resultset row class '{className}' must be a subclass of Phalcon\Mvc\Model\Row

What it means

Error "Resultset row class '{className}' must be a subclass of Phalcon\Mvc\Model\Row" thrown in phalcon/cphalcon.

Source

Thrown at phalcon/Mvc/Model/Query.zep:839

    {
        let this->type = type;

        return this;
    }

    /**
     * Sets the class used to hydrate rows that are not mapped to a model
     * (custom columns/joins). The class must be a subclass of
     * Phalcon\Mvc\Model\Row.
     */
    public function setResultsetRowClass(string resultsetRowClass) -> <QueryInterface>
    {
        if unlikely !class_exists(resultsetRowClass) {
            throw new ResultsetRowClassNotFound(resultsetRowClass);
        }

        if unlikely !is_subclass_of(resultsetRowClass, Row::class) {
            throw new InvalidResultsetRowClass(resultsetRowClass);
        }

        let this->resultsetRowClass = resultsetRowClass;

        return this;
    }

    /**
     * Tells to the query if only the first row in the resultset must be
     * returned
     */
    public function setUniqueRow(bool uniqueRow) -> <QueryInterface>
    {
        let this->uniqueRow = uniqueRow;

        return this;
    }

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Mvc/Model/Query.zep:839 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/3f0a7ed1351f8448. Report an issue: GitHub.