hibernate/hibernate-orm · error · UnsupportedOperationException
Path continuation from 'id()' reference not yet implemented
Error message
Path continuation from 'id()' reference not yet implemented
What it means
Error "Path continuation from 'id()' reference not yet implemented" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/query/hql/internal/SemanticQueryBuilder.java:3520
else if ( path != null ) {
// we have form (1)
final var sqmPath = (SqmPath<?>) path.accept( this );
return sqmPath.type();
}
else {
throw new ParsingException( "Could not interpret grammar context as entity type expression: " + ctx.getText() );
}
}
@Override
public SqmExpression<?> visitEntityIdExpression(HqlParser.EntityIdExpressionContext ctx) {
return visitEntityIdReference( ctx.entityIdReference() );
}
@Override
public SqmPath<?> visitEntityIdReference(HqlParser.EntityIdReferenceContext ctx) {
if ( ctx.pathContinuation() != null ) {
throw new UnsupportedOperationException( "Path continuation from 'id()' reference not yet implemented" );
}
final var sqmPath = consumeDomainPath( ctx.path() );
if ( sqmPath.getReferencedPathSource().getPathType()
instanceof IdentifiableDomainType<?> identifiableType ) {
final var identifierDescriptor = identifiableType.getIdentifierDescriptor();
if ( identifierDescriptor == null ) {
// mainly for benefit of Hibernate Processor
throw new FunctionArgumentException( "Argument '" + sqmPath.getNavigablePath()
+ "' of 'id()' is a '" + identifiableType.getTypeName()
+ "' and does not have a well-defined '@Id' attribute" );
}
return sqmPath.get( identifierDescriptor.getPathName(), true );
}
else if ( sqmPath instanceof SqmAnyValuedSimplePath<?> ) {
return sqmPath.resolvePathPart( AnyKeyPart.KEY_NAME, true,
processingStateStack.getCurrent().getCreationState() );
}View on GitHub (pinned to fad1729dce)
Solutions
- Avoid navigating paths from an id() function result.
- Join the entity explicitly and navigate from the join instead.
When it happens
Trigger: A runtime precondition of the Hibernate API is violated.
Common situations: Occurs when application code or configuration does not satisfy the documented contract of the API being called.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/6df779c406a8fc5c.
Report an issue: GitHub.