{"record":{"id":"8fab3b72092df7c2","repo":"phalcon/cphalcon","slug":"number-of-columns-is-not-equals-than-the-number-of","errorCode":null,"errorMessage":"Number of columns is not equals than the number of columns referenced","messagePattern":"Number of columns is not equals than the number of columns referenced","errorType":"exception","errorClass":"Phalcon\\Db\\Exceptions\\ReferencedColumnCountMismatch","httpStatus":null,"severity":"error","filePath":"phalcon/Db/Reference.zep","lineNumber":142,"sourceCode":"\n        if fetch schema, definition[\"schema\"] {\n            let this->schemaName = schema;\n        }\n\n        if fetch referencedSchema, definition[\"referencedSchema\"] {\n            let this->referencedSchema = referencedSchema;\n        }\n\n        if fetch onDelete, definition[\"onDelete\"] {\n            let this->onDelete = onDelete;\n        }\n\n        if fetch onUpdate, definition[\"onUpdate\"] {\n            let this->onUpdate = onUpdate;\n        }\n\n        if unlikely count(columns) != count(referencedColumns) {\n            throw new ReferencedColumnCountMismatch();\n        }\n    }\n\n    /**\n     * Local reference columns\n     */\n    public function getColumns() -> array\n    {\n        return this->columns;\n    }\n\n    /**\n     * Constraint name\n     */\n    public function getName() -> string\n    {\n        return this->name;\n    }","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Db/Reference.zep#L124-L160","documentation":"Error \"Number of columns is not equals than the number of columns referenced\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Db/Reference.zep:142 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"}