{"record":{"id":"2d3d61f262dab804","repo":"hibernate/hibernate-orm","slug":"encountered-non-compliant-non-standard-function-ca","errorCode":null,"errorMessage":"Encountered non-compliant non-standard function call [{originalFunctionName}], but strict JPA compliance was requested; use FUNCTION(functionName[,...]) syntax name instead","messagePattern":"Encountered non-compliant non-standard function call \\[(.+?)\\], but strict JPA compliance was requested; use FUNCTION\\(functionName\\[,\\.\\.\\.\\]\\) syntax name instead","errorType":"exception","errorClass":"StrictJpaComplianceViolation","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java","lineNumber":4639,"sourceCode":"\t\t\t\t? OBJECT_BASIC_TYPE\n\t\t\t\t: (BasicType<?>) visitCastTarget( castTarget ).getType();\n\t}\n\n\t@Override\n\tpublic String visitGenericFunctionName(HqlParser.GenericFunctionNameContext ctx) {\n\t\tfinal var functionName = new StringBuilder( visitIdentifier( ctx.simplePath().identifier() ) );\n\t\tfor ( var sp: ctx.simplePath().simplePathElement() ) {\n\t\t\t// allow function names of form foo.bar to be located in the registry\n\t\t\tfunctionName.append('.').append( visitIdentifier( sp.identifier() ) );\n\t\t}\n\t\treturn functionName.toString();\n\t}\n\n\tprivate String getFunctionName(HqlParser.GenericFunctionContext ctx) {\n\t\tfinal String originalFunctionName = visitGenericFunctionName( ctx.genericFunctionName() );\n\t\tfinal String functionName = originalFunctionName.toLowerCase();\n\t\tif ( creationOptions.useStrictJpaCompliance() && !JPA_STANDARD_FUNCTIONS.contains( functionName ) ) {\n\t\t\tthrow new StrictJpaComplianceViolation(\n\t\t\t\t\t\"Encountered non-compliant non-standard function call [\" +\n\t\t\t\t\t\t\toriginalFunctionName + \"], but strict JPA \" +\n\t\t\t\t\t\t\t\"compliance was requested; use FUNCTION(functionName[,...]) \" +\n\t\t\t\t\t\t\t\"syntax name instead\",\n\t\t\t\t\tStrictJpaComplianceViolation.Type.FUNCTION_CALL\n\t\t\t);\n\t\t}\n\t\treturn functionName;\n\t}\n\n\t@Override\n\tpublic Object visitGenericFunction(HqlParser.GenericFunctionContext ctx) {\n\t\tfinal var functionTemplate = getFunctionTemplate(  ctx );\n\t\tfinal var functionArguments = getFunctionArguments( ctx );\n\t\tfinal var filterExpression = getFilterExpression( ctx );\n\t\tfinal var function = switch ( functionTemplate.getFunctionKind() ) {\n\t\t\tcase ORDERED_SET_AGGREGATE -> functionTemplate.generateOrderedSetAggregateSqmExpression(\n\t\t\t\t\tfunctionArguments,","sourceCodeStart":4621,"sourceCodeEnd":4657,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java#L4621-L4657","documentation":"Error \"Encountered non-compliant non-standard function call [{originalFunctionName}], but strict JPA compliance was requested; use FUNCTION(functionName[,...]) syntax name instead\" thrown in hibernate/hibernate-orm.","triggerScenarios":"An HQL-specific construct is used while strict JPQL compliance is enabled: Encountered non-compliant non-standard function call [<value>], but strict JPA compliance was requested; use FUNCTION(functionName[,...]) syntax name instead","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":["Under strict JPA compliance only portable function calls are allowed. Replace the non-standard function call with the JPA 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"}