phalcon/cphalcon · error · Phalcon\Mvc\Model\Exceptions\EagerRowLimitExceeded

Eager loading '{modelName}' returned {rowCount} rows which e

Error message

Eager loading '{modelName}' returned {rowCount} rows which exceeds the limit of {limit}

What it means

Error "Eager loading '{modelName}' returned {rowCount} rows which exceeds the limit of {limit}" thrown in phalcon/cphalcon.

Source

Thrown at phalcon/Mvc/Model/Eager/Loader.zep:613

            let columnList = str_replace(" ", "", columnList);

            for referencedField in referencedFields {
                if unlikely false === strpos(columnList, referencedField) {
                    throw new MissingEagerKeyColumn(alias, referencedField);
                }
            }
        }

        let resultset = call_user_func_array(
            [modelInstance, "find"],
            [findParams]
        );

        resultset->materialize();

        if unlikely resultset->count() > self::MAX_ROWS_PER_LEVEL {
            throw new EagerRowLimitExceeded(
                referencedModel,
                resultset->count(),
                self::MAX_ROWS_PER_LEVEL
            );
        }

        return resultset;
    }

    /**
     * Relation fields are declared as a string for a single column and an
     * array for a composite key. Normalizing removes that fork everywhere
     * downstream.
     */
    protected function normalizeFields(var fields) -> array
    {
        if typeof fields === "array" {
            return fields;

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Mvc/Model/Eager/Loader.zep:613 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/d6892a76d7d28d5a. Report an issue: GitHub.