phalcon/cphalcon · error · Phalcon\Db\Exceptions\ReferencedColumnCountMismatch

Number of columns is not equals than the number of columns r

Error message

Number of columns is not equals than the number of columns referenced

What it means

Error "Number of columns is not equals than the number of columns referenced" thrown in phalcon/cphalcon.

Source

Thrown at phalcon/Db/Reference.zep:142

        if fetch schema, definition["schema"] {
            let this->schemaName = schema;
        }

        if fetch referencedSchema, definition["referencedSchema"] {
            let this->referencedSchema = referencedSchema;
        }

        if fetch onDelete, definition["onDelete"] {
            let this->onDelete = onDelete;
        }

        if fetch onUpdate, definition["onUpdate"] {
            let this->onUpdate = onUpdate;
        }

        if unlikely count(columns) != count(referencedColumns) {
            throw new ReferencedColumnCountMismatch();
        }
    }

    /**
     * Local reference columns
     */
    public function getColumns() -> array
    {
        return this->columns;
    }

    /**
     * Constraint name
     */
    public function getName() -> string
    {
        return this->name;
    }

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Db/Reference.zep:142 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/8fab3b72092df7c2. Report an issue: GitHub.