hibernate/hibernate-orm · error · SemanticException

Assignment referred to column of a joined association: ${col

Error message

Assignment referred to column of a joined association: ${columnReference}

What it means

Error "Assignment referred to column of a joined association: ${columnReference}" thrown in hibernate/hibernate-orm.

Source

Thrown at hibernate-core/src/main/java/org/hibernate/query/sqm/mutation/internal/temptable/TableBasedUpdateHandler.java:359

			}
			if ( updater.jdbcInsert != null
				&& !updater.jdbcInsert.isCompatibleWith( jdbcParameterBindings, queryOptions ) ) {
				return false;
			}
		}
		return true;
	}

	protected TableReference resolveTableReference(
			ColumnReference columnReference,
			Map<String, TableReference> tableReferenceByAlias) {
		final var tableReferenceByQualifier =
				tableReferenceByAlias.get( columnReference.getQualifier() );
		if ( tableReferenceByQualifier != null ) {
			return tableReferenceByQualifier;
		}

		throw new SemanticException( "Assignment referred to column of a joined association: " + columnReference );
	}

	protected NamedTableReference resolveUnionTableReference(
			TableReference tableReference,
			String tableExpression) {
		if ( tableReference instanceof UnionTableReference ) {
			return new NamedTableReference(
					tableExpression,
					tableReference.getIdentificationVariable(),
					tableReference.isOptional()
			);
		}
		return (NamedTableReference) tableReference;
	}

	private TableUpdater createTableUpdater(
			TableGroup updatingTableGroup,
			String tableExpression,

View on GitHub (pinned to fad1729dce)

Solutions

  1. The UPDATE assignment targets a column of a joined association, which the temp-table update handler does not support.
  2. Update the joined table separately or restructure the mapping.

When it happens

Trigger: An UPDATE/INSERT assignment targets columns that cannot be handled by the mutation strategy.

Common situations: Bulk HQL update/insert statements assigning columns spread across multiple tables or columns of joined associations.


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