{"record":{"id":"5e4b0525edbec8c7","repo":"phalcon/cphalcon","slug":"column-column-isn-t-part-of-the-column-map","errorCode":null,"errorMessage":"Column '{column}' isn't part of the column map","messagePattern":"Column '(.+?)' isn't part of the column map","errorType":"exception","errorClass":"BuilderColumnNotInMap","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model/Query/Builder.zep","lineNumber":768,"sourceCode":"                );\n\n            let noPrimary = true,\n                primaryKeys = metaData->getPrimaryKeyAttributes(modelInstance);\n\n            if !empty primaryKeys {\n                if fetch firstPrimaryKey, primaryKeys[0] {\n                    /**\n                     * The PHQL contains the renamed columns if available\n                     */\n                    if Settings::get(\"orm.column_renaming\") {\n                        let columnMap = metaData->getColumnMap(modelInstance);\n                    } else {\n                        let columnMap = null;\n                    }\n\n                    if typeof columnMap == \"array\" {\n                        if unlikely !fetch attributeField, columnMap[firstPrimaryKey] {\n                            throw new BuilderColumnNotInMap(firstPrimaryKey);\n                        }\n                    } else {\n                        let attributeField = firstPrimaryKey;\n                    }\n\n                    /**\n                     * Use a named bind parameter instead of embedding the value\n                     * directly in the PHQL string. Embedding produces a unique\n                     * PHQL string per ID value, causing unbounded growth of the\n                     * internal PHQL cache in long-running processes.\n                     */\n                    let this->bindParams[\"APK0\"] = conditions,\n                        conditions = this->autoescape(model) . \".\" . this->autoescape(attributeField) . \" = :APK0:\",\n                        noPrimary = false;\n                }\n            }\n\n            /**","sourceCodeStart":750,"sourceCodeEnd":786,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model/Query/Builder.zep#L750-L786","documentation":"Error \"Column '{column}' isn't part of the column map\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model/Query/Builder.zep:768 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"}