{"record":{"id":"6df779c406a8fc5c","repo":"hibernate/hibernate-orm","slug":"path-continuation-from-id-reference-not-yet-im","errorCode":null,"errorMessage":"Path continuation from 'id()' reference not yet implemented","messagePattern":"Path continuation from 'id\\(\\)' reference not yet implemented","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java","lineNumber":3520,"sourceCode":"\t\telse if ( path != null ) {\n\t\t\t// we have form (1)\n\t\t\tfinal var sqmPath = (SqmPath<?>) path.accept( this );\n\t\t\treturn sqmPath.type();\n\t\t}\n\t\telse {\n\t\t\tthrow new ParsingException( \"Could not interpret grammar context as entity type expression: \" + ctx.getText() );\n\t\t}\n\t}\n\n\t@Override\n\tpublic SqmExpression<?> visitEntityIdExpression(HqlParser.EntityIdExpressionContext ctx) {\n\t\treturn visitEntityIdReference( ctx.entityIdReference() );\n\t}\n\n\t@Override\n\tpublic SqmPath<?> visitEntityIdReference(HqlParser.EntityIdReferenceContext ctx) {\n\t\tif ( ctx.pathContinuation() != null ) {\n\t\t\tthrow new UnsupportedOperationException( \"Path continuation from 'id()' reference not yet implemented\" );\n\t\t}\n\n\t\tfinal var sqmPath = consumeDomainPath( ctx.path() );\n\t\tif ( sqmPath.getReferencedPathSource().getPathType()\n\t\t\t\tinstanceof IdentifiableDomainType<?> identifiableType ) {\n\t\t\tfinal var identifierDescriptor = identifiableType.getIdentifierDescriptor();\n\t\t\tif ( identifierDescriptor == null ) {\n\t\t\t\t// mainly for benefit of Hibernate Processor\n\t\t\t\tthrow new FunctionArgumentException( \"Argument '\" + sqmPath.getNavigablePath()\n\t\t\t\t\t\t+ \"' of 'id()' is a '\" + identifiableType.getTypeName()\n\t\t\t\t\t\t+ \"' and does not have a well-defined '@Id' attribute\" );\n\t\t\t}\n\t\t\treturn sqmPath.get( identifierDescriptor.getPathName(), true );\n\t\t}\n\t\telse if ( sqmPath instanceof SqmAnyValuedSimplePath<?> ) {\n\t\t\treturn sqmPath.resolvePathPart( AnyKeyPart.KEY_NAME, true,\n\t\t\t\t\tprocessingStateStack.getCurrent().getCreationState() );\n\t\t}","sourceCodeStart":3502,"sourceCodeEnd":3538,"githubUrl":"https://github.com/hibernate/hibernate-orm/blob/fad1729dce015f908198d57a8d80274a30f905a5/hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java#L3502-L3538","documentation":"Error \"Path continuation from 'id()' reference not yet implemented\" thrown in hibernate/hibernate-orm.","triggerScenarios":"A runtime precondition of the Hibernate API is violated.","commonSituations":"Occurs when application code or configuration does not satisfy the documented contract of the API being called.","solutions":["Avoid navigating paths from an id() function result.","Join the entity explicitly and navigate from the join instead."],"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"}