hibernate/hibernate-orm · error · IllegalArgumentException
{} is not relevant for MutationQuery
Error message
{} is not relevant for MutationQuery What it means
Error "{} is not relevant for MutationQuery" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/query/internal/MutationQueryImpl.java:525
}
@Override
@Nonnull
public MutationQueryImplementor<T> setFlushMode(@Nonnull FlushModeType flushMode) {
super.setFlushMode( flushMode );
return this;
}
@Override
@Nonnull
public MutationQueryImplementor<T> setHint(@Nonnull String hintName, @Nullable Object value) {
super.setHint( hintName, value );
return this;
}
private void irrelevantHint(String tag) {
final var msg = tag + " is not relevant for MutationQuery";
throw new IllegalArgumentException( msg, new IllegalSelectQueryException( msg, hql ) );
}
@Override
protected void applyReadOnlyHint(String hintName, Object value) {
irrelevantHint( "Read-only" );
}
@Override
protected void applyFetchSizeHint(String hintName, Object value) {
irrelevantHint( "Fetch-size" );
}
@Override
protected void applyResultCachingHint(String hintName, Object value) {
irrelevantHint( "Result-caching" );
}
@OverrideView on GitHub (pinned to fad1729dce)
Solutions
- The indicated option does not apply to a mutation query. Remove the option or use a selection query.
When it happens
Trigger: A runtime precondition of the Hibernate query API is violated: <value> is not relevant for MutationQuery
Common situations: Application code or configuration calls the query API in a way that violates its documented contract; the interpolated values in the message identify the offending input.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/3b47a9b943b69ef7.
Report an issue: GitHub.