{"record":{"id":"e5aad891f09abcd3","repo":"hibernate/hibernate-orm","slug":"fqn-entity-name","errorCode":"FQN_ENTITY_NAME","errorMessage":"Encountered FQN entity name [\" + name + \"], but strict JPQL compliance was requested ( [\" + entityDescriptor.getName() + \"] should be used instead )","messagePattern":"Encountered FQN entity name \\[\" \\+ name \\+ \"\\], but strict JPQL compliance was requested \\( \\[\" \\+ entityDescriptor\\.getName\\(\\) \\+ \"\\] should be used instead \\)","errorType":"exception","errorClass":"StrictJpaComplianceViolation","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java","lineNumber":6206,"sourceCode":"\t}\n\n\tprivate SqmPath<?> consumePluralAttributeReference(HqlParser.PathContext parserPath) {\n\t\tfinal var sqmPath = consumeDomainPath( parserPath );\n\t\tfinal var pathSource = sqmPath.getReferencedPathSource();\n\t\tif ( pathSource instanceof PluralPersistentAttribute ) {\n\t\t\treturn sqmPath;\n\t\t}\n\t\telse {\n\t\t\tthrow new PathException( \"Expecting plural attribute valued path [\"\n\t\t\t\t\t\t+ sqmPath.getNavigablePath() + \"], but found: \"\n\t\t\t\t\t\t+ pathSource.getPathType() );\n\t\t}\n\t}\n\n\tprivate void checkFQNEntityNameJpaComplianceViolationIfNeeded(String name, EntityDomainType<?> entityDescriptor) {\n\t\tif ( getCreationOptions().useStrictJpaCompliance() && ! name.equals( entityDescriptor.getName() ) ) {\n\t\t\t// FQN is the only possible reason\n\t\t\tthrow new StrictJpaComplianceViolation(\"Encountered FQN entity name [\" + name + \"], \" +\n\t\t\t\t\t\"but strict JPQL compliance was requested ( [\" + entityDescriptor.getName() + \"] should be used instead )\",\n\t\t\t\t\tStrictJpaComplianceViolation.Type.FQN_ENTITY_NAME\n\t\t\t);\n\t\t}\n\t}\n\n\tprivate enum ParameterStyle {\n\t\tUNKNOWN {\n\t\t\t@Override\n\t\t\tParameterStyle withNamed() {\n\t\t\t\treturn NAMED;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tParameterStyle withPositional() {\n\t\t\t\treturn POSITIONAL;\n\t\t\t}\n\t\t},","sourceCodeStart":6188,"sourceCodeEnd":6224,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java#L6188-L6224","documentation":"Error \"Encountered FQN entity name [\" + name + \"], but strict JPQL compliance was requested ( [\" + entityDescriptor.getName() + \"] should be used instead )\" thrown in hibernate/hibernate-orm.","triggerScenarios":"An HQL-specific construct is used while strict JPQL compliance is enabled: Encountered FQN entity name [\" + name + \"], but strict JPQL compliance was requested ( [\" + entityDescriptor.getName() + \"] should be used 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":["Strict JPQL compliance forbids fully-qualified entity names. Use the entity name (as given by @Entity(name=...) or the simple class name) instead of the FQN, or relax 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"}