{"record":{"id":"4fe684c0e3608bb3","repo":"hibernate/hibernate-orm","slug":"unrecognized-constraint-type","errorCode":null,"errorMessage":"Unrecognized constraint type '{}'","messagePattern":"Unrecognized constraint type '(.+?)'","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/restriction/JakartaDataRestriction.java","lineNumber":345,"sourceCode":"\t\t\t\t\tstringExpression( like.pattern(), root, builder ),\n\t\t\t\t\tlike.escape()\n\t\t\t);\n\t\t}\n\t\telse if ( constraint instanceof NotLike notLike ) {\n\t\t\treturn builder.notLike(\n\t\t\t\t\tstringExpression( expression ),\n\t\t\t\t\tstringExpression( notLike.pattern(), root, builder ),\n\t\t\t\t\tnotLike.escape()\n\t\t\t);\n\t\t}\n\t\telse if ( constraint instanceof Null<?> ) {\n\t\t\treturn builder.isNull( expression );\n\t\t}\n\t\telse if ( constraint instanceof NotNull<?> ) {\n\t\t\treturn builder.isNotNull( expression );\n\t\t}\n\t\telse {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Unrecognized constraint type '\" + constraint.getClass().getName() + \"'\" );\n\t\t}\n\t}\n\n\tprivate static Predicate in(\n\t\t\tExpression<?> expression,\n\t\t\tList<? extends jakarta.data.expression.Expression<?, ?>> expressions,\n\t\t\tRoot<?> root,\n\t\t\tCriteriaBuilder builder) {\n\t\tfinal ArrayList<Expression<?>> values = new ArrayList<>( expressions.size() );\n\t\tfor ( var value : expressions ) {\n\t\t\tif ( value instanceof Literal<?> literal ) {\n\t\t\t\tverifyValueType( expression, literal.value() );\n\t\t\t\tvalues.add( literal( literal.value(), expression, builder ) );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfinal var valueExpression = expression( value, root, builder );\n\t\t\t\tverifyAssignableExpressionType( expression, valueExpression );","sourceCodeStart":327,"sourceCodeEnd":363,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/restriction/JakartaDataRestriction.java#L327-L363","documentation":"Error \"Unrecognized constraint type '{}'\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A Jakarta Data restriction is invalid or unsupported: Unrecognized constraint type '<value>'","commonSituations":"Building Restrictions with empty paths, unsupported restriction/constraint/expression types, or expressions of the wrong Java type.","solutions":["The constraint type is not recognized. Use a supported constraint (equal-to, like, between, ...) for the restriction."],"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"}