{"record":{"id":"fba2cd92acbb92a6","repo":"hibernate/hibernate-orm","slug":"strict-jpa-query-language-compliance-was-violated-fba2cd","errorCode":null,"errorMessage":"Strict JPA query language compliance was violated: improper non-standard function call","messagePattern":"Strict JPA query language compliance was violated: improper non-standard function call","errorType":"exception","errorClass":"StrictJpaComplianceViolation","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java","lineNumber":5209,"sourceCode":"\t\t\t\tlength == null\n\t\t\t\t\t\t? asList( string, replacement, start )\n\t\t\t\t\t\t: asList( string, replacement, start, length ),\n\t\t\t\tnull,\n\t\t\t\tqueryEngine()\n\t\t);\n\t}\n\n\t@Override\n\tpublic SqmExpression<?> visitEveryFunction(HqlParser.EveryFunctionContext ctx) {\n\t\tfinal var subqueryContext = ctx.subquery();\n\t\tfinal var predicate = ctx.predicate();\n\t\tif ( subqueryContext != null ) {\n\t\t\tfinal var subquery = (SqmSubQuery<?>) subqueryContext.accept( this );\n\t\t\treturn new SqmEvery<>( subquery, nodeBuilder() );\n\t\t}\n\t\telse if ( predicate != null ) {\n\t\t\tif ( getCreationOptions().useStrictJpaCompliance() ) {\n\t\t\t\tthrow new StrictJpaComplianceViolation( StrictJpaComplianceViolation.Type.FUNCTION_CALL );\n\t\t\t}\n\t\t\tfinal var argument = (SqmExpression<?>) predicate.accept( this );\n\t\t\treturn applyOverClause(\n\t\t\t\t\tctx.overClause(),\n\t\t\t\t\tgetFunctionDescriptor( \"every\" ).generateAggregateSqmExpression(\n\t\t\t\t\t\t\tsingletonList( argument ),\n\t\t\t\t\t\t\tgetFilterExpression( ctx ),\n\t\t\t\t\t\t\tnodeBuilder().getBooleanType(),\n\t\t\t\t\t\t\tqueryEngine()\n\t\t\t\t\t)\n\t\t\t);\n\t\t}\n\t\telse {\n\t\t\tif ( getCreationOptions().useStrictJpaCompliance() ) {\n\t\t\t\tthrow new StrictJpaComplianceViolation( StrictJpaComplianceViolation.Type.HQL_COLLECTION_FUNCTION );\n\t\t\t}\n\t\t\treturn new SqmEvery<>(\n\t\t\t\t\tcreateCollectionReferenceSubQuery(","sourceCodeStart":5191,"sourceCodeEnd":5227,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java#L5191-L5227","documentation":"Error \"Strict JPA query language compliance was violated: improper non-standard function call\" thrown in hibernate/hibernate-orm.","triggerScenarios":"An HQL-specific construct is used while strict JPQL compliance is enabled: Strict JPA query language compliance was violated: improper non-standard function call","commonSituations":"Applications running with hibernate.jpa.compliance.query=true (or JPA-compliance mode) that submit queries using Hibernate extensions such as collations, tuples/row value constructors, HQL collection functions (maxelement/elements/indices), value()/key() on non-Map types, or non-standard function calls without FUNCTION() syntax.","solutions":["A non-standard function call was used while strict JPA compliance was requested. Rewrite the call using JPA-standard FUNCTION('name', ...) syntax or disable strict JPA compliance."],"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"}