hibernate/hibernate-orm · error · UnsupportedOperationException
Entity graphs are not supported for mutation queries
Error message
Entity graphs are not supported for mutation queries
What it means
Error "Entity graphs are not supported for mutation queries" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/query/internal/MutationQueryImpl.java:595
// else, per spec, just ignore this
}
@Override
protected void applyLockTimeoutHint(String hintName, Object timeout) {
irrelevantHint( "Locking" );
}
@Override
protected void applyFollowOnStrategyHint(Object value) {
irrelevantHint( "Locking" );
}
@Override
@Deprecated
@SuppressWarnings("removal")
@Nonnull
public Query<T> setEntityGraph(@Nonnull EntityGraph<? super T> graph, @Nonnull GraphSemantic semantic) {
throw new UnsupportedOperationException( "Entity graphs are not supported for mutation queries" );
}
@Override
@SuppressWarnings("removal")
@Nonnull
public Query<T> enableFetchProfile(@Nonnull String profileName) {
throw new UnsupportedOperationException( "Fetch profiles are not supported for mutation queries" );
}
@Override
@SuppressWarnings("removal")
@Nonnull
public Query<T> disableFetchProfile(@Nonnull String profileName) {
throw new UnsupportedOperationException( "Fetch profiles are not supported for mutation queries" );
}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Parameter handlingView on GitHub (pinned to fad1729dce)
Solutions
- Entity graphs cannot be applied to mutation queries. Remove the entity graph hint from the update/delete query.
When it happens
Trigger: An entity graph or fetch profile is applied where unsupported: Entity graphs are not supported for mutation queries
Common situations: Setting fetch graphs/load graphs or fetch profiles on mutation queries, or referencing an undefined fetch profile name.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/37e7b4e93fb5ff83.
Report an issue: GitHub.