{"record":{"id":"f0ac8cfc05209950","repo":"hibernate/hibernate-orm","slug":"unable-to-determine-tablereference-s-for-s-f0ac8c","errorCode":null,"errorMessage":"Unable to determine TableReference (`%s`) for `%s`","messagePattern":"Unable to determine TableReference \\(`(.+?)`\\) for `(.+?)`","errorType":"exception","errorClass":"UnknownTableReferenceException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/sql/ast/tree/from/NamedTableReference.java","lineNumber":139,"sourceCode":"\t@Override\n\tpublic boolean containsAffectedTableName(String requestedName) {\n\t\treturn isEmpty( requestedName ) || tableExpression.equals( requestedName );\n\t}\n\n\t@Override\n\tpublic Boolean visitAffectedTableNames(Function<String, Boolean> nameCollector) {\n\t\treturn nameCollector.apply( tableExpression );\n\t}\n\n\t@Override\n\tpublic TableReference resolveTableReference(\n\t\t\tNavigablePath navigablePath,\n\t\t\tString tableExpression) {\n\t\tif ( this.tableExpression.equals( tableExpression ) ) {\n\t\t\treturn this;\n\t\t}\n\n\t\tthrow new UnknownTableReferenceException(\n\t\t\t\ttableExpression,\n\t\t\t\tString.format(\n\t\t\t\t\t\tLocale.ROOT,\n\t\t\t\t\t\t\"Unable to determine TableReference (`%s`) for `%s`\",\n\t\t\t\t\t\ttableExpression,\n\t\t\t\t\t\tnavigablePath\n\t\t\t\t)\n\t\t);\n\t}\n\n\t@Override\n\tpublic TableReference getTableReference(\n\t\t\tNavigablePath navigablePath,\n\t\t\tString tableExpression,\n\t\t\tboolean resolve) {\n\t\treturn this.tableExpression.equals( tableExpression ) ? this : null;\n\t}\n","sourceCodeStart":121,"sourceCodeEnd":157,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/sql/ast/tree/from/NamedTableReference.java#L121-L157","documentation":"Error \"Unable to determine TableReference (`%s`) for `%s`\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A column reference qualifier cannot be resolved against a named table reference.","commonSituations":"Referencing a column with a table alias/name that does not match the named table in the FROM clause, e.g. wrong alias in a native or entity query.","solutions":["The column reference qualifier does not match the named table reference. Verify the table alias/qualification used in the query matches the FROM clause.","If generated internally by Hibernate, report it as a Hibernate bug with the stack trace."],"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"}