{"record":{"id":"a59074214f8a52a4","repo":"hibernate/hibernate-orm","slug":"unable-to-find-column-with-logical-name-in-tabl","errorCode":null,"errorMessage":"Unable to find column with logical name {} in table {}","messagePattern":"Unable to find column with logical name (.+?) in table (.+?)","errorType":"exception","errorClass":"MappingException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java","lineNumber":1182,"sourceCode":"\t\t}\n\n\t\tTable currentTable = table;\n\t\twhile ( currentTable != null ) {\n\t\t\tfinal TableColumnNameBinding binding = columnNameBindingByTableMap.get( currentTable );\n\t\t\tif ( binding != null ) {\n\t\t\t\tfinal String physicalName = binding.logicalToPhysical.get( logicalName );\n\t\t\t\tif ( physicalName != null ) {\n\t\t\t\t\treturn physicalName;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcurrentTable =\n\t\t\t\t\tcurrentTable instanceof DenormalizedTable denormalizedTable\n\t\t\t\t\t\t\t? denormalizedTable.getIncludedTable()\n\t\t\t\t\t\t\t: null;\n\t\t}\n\n\t\tassert table != null;\n\t\tthrow new MappingException( \"Unable to find column with logical name \" + logicalName.render()\n\t\t\t\t+ \" in table \" + table.getName() );\n\t}\n\n\t@Override\n\tpublic String getLogicalColumnName(Table table, String physicalName) throws MappingException {\n\t\treturn getLogicalColumnName( table, getDatabase().toIdentifier( physicalName ) );\n\t}\n\n\n\t@Override\n\tpublic String getLogicalColumnName(Table table, Identifier physicalName) throws MappingException {\n\t\tfinal String physicalNameString = physicalName.render( getDialect() );\n\t\tIdentifier logicalName = null;\n\t\tTable currentTable = table;\n\t\twhile ( currentTable != null ) {\n\t\t\tfinal TableColumnNameBinding binding = columnNameBindingByTableMap.get( currentTable );\n\t\t\tif ( binding != null ) {\n\t\t\t\tlogicalName = binding.physicalToLogical.get( physicalNameString );","sourceCodeStart":1164,"sourceCodeEnd":1200,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/boot/internal/InFlightMetadataCollectorImpl.java#L1164-L1200","documentation":"Error \"Unable to find column with logical name {} in table {}\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A referenced column name does not exist in the named table's logical/physical column mappings.","commonSituations":"@JoinColumn or @Column referencing a column name that was never declared on the target table, often due to mismatched naming strategies or typos.","solutions":["Confirm the logical column name used in @JoinColumn/@Column matches the name defined on the target entity mapping (naming strategy applies).","Check whether a physical naming strategy transforms the name; use the logical (pre-strategy) name.","List the table's columns in the mapping metadata to see the actual registered logical names."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}