{"record":{"id":"d43cc670f0861cf5","repo":"hibernate/hibernate-orm","slug":"fetch-profiles-are-not-supported-for-mutation-quer","errorCode":null,"errorMessage":"Fetch profiles are not supported for mutation queries","messagePattern":"Fetch profiles 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":602,"sourceCode":"\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\n\t@Override\n\t@Nonnull\n\tpublic ParameterMetadataImplementor getParameterMetadata() {\n\t\treturn parameterMetadata;\n\t}\n\n\t@Override","sourceCodeStart":584,"sourceCodeEnd":620,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/internal/MutationQueryImpl.java#L584-L620","documentation":"Error \"Fetch profiles are not supported for mutation queries\" thrown in hibernate/hibernate-orm.","triggerScenarios":"An entity graph or fetch profile is applied where unsupported: Fetch profiles 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":["Fetch profiles cannot be applied to mutation queries. Remove the fetch profile enablement for the mutation."],"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"}