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/MappedByTableGroup.java:128

	}

	@Override
	public List<TableReferenceJoin> getTableReferenceJoins() {
		return Collections.emptyList();
	}

	@Override
	public TableReference resolveTableReference(
			NavigablePath navigablePath,
			String tableExpression) {
		final TableReference tableReference = getTableReference(
				navigablePath,
				tableExpression,
				true
		);

		if ( tableReference == null ) {
			throw new UnknownTableReferenceException(
					tableExpression,
					String.format(
							Locale.ROOT,
							"Unable to determine TableReference (`%s`) for `%s`",
							tableExpression,
							navigablePath
					)
			);
		}

		return tableReference;
	}

	@Override
	public TableReference resolveTableReference(
			NavigablePath navigablePath,
			ValuedModelPart modelPart,
			String tableExpression) {

View on GitHub (pinned to fad1729dce)

Solutions

  1. The column reference qualifier does not match any table reference known to the mapped-by table group. Check the query's qualification and the association's mappedBy configuration.
  2. If generated internally, report it as a Hibernate bug with the query and mappings.

When it happens

Trigger: A column reference qualifier cannot be resolved against a mapped-by table group.

Common situations: Joining through a mapped-by (inverse) association and referencing a column by an alias that the table group does not qualify.


AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22). Data as JSON: /api/errors/f697773f78eaf3a9. Report an issue: GitHub.