{"record":{"id":"bdf60a9fe879b19f","repo":"hibernate/hibernate-orm","slug":"no-fetch-profile-named-name","errorCode":null,"errorMessage":"No fetch profile named '${name}'","messagePattern":"No fetch profile named '(.+?)'","errorType":"exception","errorClass":"UnknownProfileException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/sql/internal/NativeQueryImpl.java","lineNumber":808,"sourceCode":"\n\t@Override @Deprecated\n\t@SuppressWarnings(\"removal\")\n\t@Nonnull\n\tpublic NativeQueryImplementor<R> disableFetchProfile(@Nonnull String profileName) {\n\t\tqueryOptions.disableFetchProfile( profileName );\n\t\treturn this;\n\t}\n\n\t@Override @Deprecated\n\t@SuppressWarnings(\"removal\")\n\t@Nonnull\n\tpublic NativeQueryImplementor<R> enableFetchProfile(@Nonnull String profileName) {\n\t\tif ( getSessionFactory().containsFetchProfileDefinition( profileName ) ) {\n\t\t\tgetQueryOptions().enableFetchProfile( profileName );\n\t\t\treturn this;\n\t\t}\n\t\telse {\n\t\t\tthrow new UnknownProfileException( profileName );\n\t\t}\n\t}\n\n\t@Override\n\tpublic NativeQueryImplementor<R> setPage(Page page) {\n\t\tfinal var limit = queryOptions.getLimit();\n\t\tlimit.setFirstRow( page.getFirstResult() );\n\t\tlimit.setMaxRows( page.getMaxResults() );\n\t\treturn this;\n\t}\n\n\t@Override\n\t@Nonnull\n\tpublic NativeQueryImplementor<R> setFollowOnStrategy(@Nonnull Locking.FollowOn followOnStrategy) {\n\t\t//noinspection removal\n\t\tqueryOptions.getLockOptions().setFollowOnStrategy( followOnStrategy );\n\t\treturn this;\n\t}","sourceCodeStart":790,"sourceCodeEnd":826,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/sql/internal/NativeQueryImpl.java#L790-L826","documentation":"Error \"No fetch profile named '${name}'\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A name referenced in the query or its configuration cannot be resolved at runtime.","commonSituations":"Typos in fetch-profile, memento, or table names, or references to objects that were never registered.","solutions":["No fetch profile with that name is defined.","Check the name passed to enableFetchProfile against @FetchProfile definitions, or define the fetch profile."],"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"}