{"record":{"id":"0948a75d571cf031","repo":"hibernate/hibernate-orm","slug":"unsupported-jakarta-data-restriction-type","errorCode":null,"errorMessage":"Unsupported Jakarta Data restriction type: {}","messagePattern":"Unsupported Jakarta Data restriction type: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/restriction/JakartaDataRestriction.java","lineNumber":196,"sourceCode":"\t\tquery.orderBy( orders );\n\t}\n\n\t/**\n\t * Obtain a {@linkplain Predicate JPA criteria predicate} representing the given\n\t * {@linkplain jakarta.data.restrict.Restriction Jakarta Data restriction}.\n\t */\n\tprivate static Predicate restriction(\n\t\t\tjakarta.data.restrict.Restriction<?> restriction,\n\t\t\tRoot<?> root,\n\t\t\tCriteriaBuilder builder) {\n\t\tif ( restriction instanceof BasicRestriction<?, ?> basicRestriction ) {\n\t\t\treturn basicRestriction( basicRestriction, root, builder );\n\t\t}\n\t\telse if ( restriction instanceof CompositeRestriction<?> compositeRestriction ) {\n\t\t\treturn compositeRestriction( compositeRestriction, root, builder );\n\t\t}\n\t\telse {\n\t\t\tthrow new UnsupportedOperationException(\n\t\t\t\t\t\"Unsupported Jakarta Data restriction type: \" + restriction.getClass().getName() );\n\t\t}\n\t}\n\n\t/**\n\t * Obtain a {@linkplain Predicate JPA criteria predicate} representing the given\n\t * {@linkplain CompositeRestriction composite Jakarta Data restriction}.\n\t */\n\tprivate static Predicate compositeRestriction(\n\t\t\tCompositeRestriction<?> compositeRestriction,\n\t\t\tRoot<?> root,\n\t\t\tCriteriaBuilder builder) {\n\t\tvar restrictions = compositeRestriction.restrictions();\n\t\tfinal List<Predicate> list = new ArrayList<>( restrictions.size() );\n\t\tfor ( var restriction : restrictions ) {\n\t\t\tlist.add( restriction( restriction, root, builder ) );\n\t\t}\n\t\tfinal var predicates = list.toArray( Predicate[]::new );","sourceCodeStart":178,"sourceCodeEnd":214,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/restriction/JakartaDataRestriction.java#L178-L214","documentation":"Error \"Unsupported Jakarta Data restriction type: {}\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A Jakarta Data restriction is invalid or unsupported: Unsupported Jakarta Data restriction type: <value>","commonSituations":"Building Restrictions with empty paths, unsupported restriction/constraint/expression types, or expressions of the wrong Java type.","solutions":["The Jakarta Data restriction type is not supported. Use one of the supported restriction types."],"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"}