{"record":{"id":"37e7b4e93fb5ff83","repo":"hibernate/hibernate-orm","slug":"entity-graphs-are-not-supported-for-mutation-queri","errorCode":null,"errorMessage":"Entity graphs are not supported for mutation queries","messagePattern":"Entity graphs are not supported for mutation queries","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/internal/MutationQueryImpl.java","lineNumber":595,"sourceCode":"\t\t// else, per spec, just ignore this\n\t}\n\n\t@Override\n\tprotected void applyLockTimeoutHint(String hintName, Object timeout) {\n\t\tirrelevantHint( \"Locking\" );\n\t}\n\n\t@Override\n\tprotected void applyFollowOnStrategyHint(Object value) {\n\t\tirrelevantHint( \"Locking\" );\n\t}\n\n\t@Override\n\t@Deprecated\n\t@SuppressWarnings(\"removal\")\n\t@Nonnull\n\tpublic Query<T> setEntityGraph(@Nonnull EntityGraph<? super T> graph, @Nonnull GraphSemantic semantic) {\n\t\tthrow new UnsupportedOperationException( \"Entity graphs are not supported for mutation queries\" );\n\t}\n\n\t@Override\n\t@SuppressWarnings(\"removal\")\n\t@Nonnull\n\tpublic Query<T> enableFetchProfile(@Nonnull String profileName) {\n\t\tthrow new UnsupportedOperationException( \"Fetch profiles are not supported for mutation queries\" );\n\t}\n\n\t@Override\n\t@SuppressWarnings(\"removal\")\n\t@Nonnull\n\tpublic Query<T> disableFetchProfile(@Nonnull String profileName) {\n\t\tthrow new UnsupportedOperationException( \"Fetch profiles are not supported for mutation queries\" );\n\t}\n\n\t// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\t// Parameter handling","sourceCodeStart":577,"sourceCodeEnd":613,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/internal/MutationQueryImpl.java#L577-L613","documentation":"Error \"Entity graphs are not supported for mutation queries\" thrown in hibernate/hibernate-orm.","triggerScenarios":"An entity graph or fetch profile is applied where unsupported: Entity graphs are not supported for mutation queries","commonSituations":"Setting fetch graphs/load graphs or fetch profiles on mutation queries, or referencing an undefined fetch profile name.","solutions":["Entity graphs cannot be applied to mutation queries. Remove the entity graph hint from the update/delete query."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fad1729dce015f908198d57a8d80274a30f905a5","analyzedAt":"2026-08-22T04:13:57.527Z","schemaVersion":2},"datasetVersion":"2026-08-22T09:17:25.309Z"}