{"record":{"id":"9473f6e755f8bb74","repo":"phalcon/cphalcon","slug":"cannot-obtain-table-columns-for-the-mapped-source","errorCode":null,"errorMessage":"Cannot obtain table columns for the mapped source '{completeTable}' used in model {className}","messagePattern":"Cannot obtain table columns for the mapped source '(.+?)' used in model (.+?)","errorType":"exception","errorClass":"Phalcon\\Mvc\\Model\\MetaData\\Exceptions\\CannotObtainTableColumns","httpStatus":null,"severity":"error","filePath":"phalcon/Mvc/Model/MetaData/Strategy/Introspection.zep","lineNumber":107,"sourceCode":"            throw new TableNotInDatabase(completeTable, get_class(model));\n        }\n\n        /**\n         * Try to describe the table\n         */\n        let columns = readConnection->describeColumns(table, schema);\n\n        if unlikely empty columns {\n            if schema {\n                let completeTable = schema . \"'.'\" . table;\n            } else {\n                let completeTable = table;\n            }\n\n            /**\n             * The table not exists\n             */\n            throw new CannotObtainTableColumns(completeTable, get_class(model));\n        }\n\n        /**\n         * Initialize meta-data\n         */\n        let attributes = [];\n        let primaryKeys = [];\n        let nonPrimaryKeys = [];\n        let numericTyped = [];\n        let notNull = [];\n        let fieldTypes = [];\n        let fieldBindTypes = [];\n        let automaticDefault = [];\n        let identityField = false;\n        let defaultValues = [];\n        let emptyStringValues = [];\n\n        for column in columns {","sourceCodeStart":89,"sourceCodeEnd":125,"githubUrl":"https://github.com/phalcon/cphalcon/blob/b7419de9cd0a8a3f48441ead84c9f8415d463e25/phalcon/Mvc/Model/MetaData/Strategy/Introspection.zep#L89-L125","documentation":"Error \"Cannot obtain table columns for the mapped source '{completeTable}' used in model {className}\" thrown in phalcon/cphalcon.","triggerScenarios":"Thrown at phalcon/Mvc/Model/MetaData/Strategy/Introspection.zep:107 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"}