hibernate/hibernate-orm · error · UnknownTableReferenceException
Unable to determine TableReference (`%s`) for `%s`
Error message
Unable to determine TableReference (`%s`) for `%s`
What it means
Error "Unable to determine TableReference (`%s`) for `%s`" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/sql/ast/tree/from/NamedTableReference.java:139
@Override
public boolean containsAffectedTableName(String requestedName) {
return isEmpty( requestedName ) || tableExpression.equals( requestedName );
}
@Override
public Boolean visitAffectedTableNames(Function<String, Boolean> nameCollector) {
return nameCollector.apply( tableExpression );
}
@Override
public TableReference resolveTableReference(
NavigablePath navigablePath,
String tableExpression) {
if ( this.tableExpression.equals( tableExpression ) ) {
return this;
}
throw new UnknownTableReferenceException(
tableExpression,
String.format(
Locale.ROOT,
"Unable to determine TableReference (`%s`) for `%s`",
tableExpression,
navigablePath
)
);
}
@Override
public TableReference getTableReference(
NavigablePath navigablePath,
String tableExpression,
boolean resolve) {
return this.tableExpression.equals( tableExpression ) ? this : null;
}
View on GitHub (pinned to fad1729dce)
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.
When it happens
Trigger: A column reference qualifier cannot be resolved against a named table reference.
Common situations: 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.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/f0ac8cfc05209950.
Report an issue: GitHub.