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/cte/CteUpdateHandler.java:317
BiConsumer<String, TableReference> consumer) {
consumer.accept( tableReference.getIdentificationVariable(), tableReference );
}
private void collectTableReference(
TableReferenceJoin tableReferenceJoin,
BiConsumer<String, TableReference> consumer) {
collectTableReference( tableReferenceJoin.getJoinedTableReference(), consumer );
}
private TableReference resolveTableReference(
ColumnReference columnReference,
Map<String, TableReference> tableReferenceByAlias) {
final TableReference tableReferenceByQualifier = tableReferenceByAlias.get( columnReference.getQualifier() );
if ( tableReferenceByQualifier != null ) {
return tableReferenceByQualifier;
}
throw new SemanticException( "Assignment referred to column of a joined association: " + columnReference );
}
@Override
protected String getCteTableName(String tableExpression) {
final Dialect dialect = getSessionFactory().getJdbcServices().getDialect();
if ( Identifier.isQuoted( tableExpression ) ) {
tableExpression = QualifiedNameParser.INSTANCE.parse( tableExpression ).getObjectName().getText();
}
return Identifier.toIdentifier( UPDATE_RESULT_TABLE_NAME_PREFIX + tableExpression ).render( dialect );
}
protected String getInsertCteTableName(String tableExpression) {
final Dialect dialect = getSessionFactory().getJdbcServices().getDialect();
if ( Identifier.isQuoted( tableExpression ) ) {
tableExpression = tableExpression.substring( 1, tableExpression.length() - 1 );
}
return Identifier.toIdentifier( INSERT_RESULT_TABLE_NAME_PREFIX + tableExpression ).render( dialect );
}View on GitHub (pinned to fad1729dce)
Solutions
- The UPDATE assignment targets a column of a joined (secondary table or joined-subclass) association, which inline update does not support.
- Assign only columns of the root table, or use a different mutation strategy, or update the associated table separately.
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/2930a576fb081afe.
Report an issue: GitHub.