hibernate/hibernate-orm · error · TerminalPathException
Terminal path${pathDesc}has no attribute '${name}'
Error message
Terminal path${pathDesc}has no attribute '${name}' What it means
Error "Terminal path${pathDesc}has no attribute '${name}'" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/metamodel/model/domain/internal/BasicSqmPathSource.java:60
this.relationalJavaType = relationalJavaType;
this.isGeneric = isGeneric;
}
@Override
public String getTypeName() {
return super.getTypeName();
}
// @Override
// public SqmDomainType<J> getSqmType() {
// return getPathType();
// }
@Override
public @Nullable SqmPathSource<?> findSubPathSource(String name) {
final String path = pathModel.getPathName();
final String pathDesc = path == null || path.startsWith( "{" ) ? " " : " '" + pathModel.getPathName() + "' ";
throw new TerminalPathException( "Terminal path" + pathDesc + "has no attribute '" + name + "'" );
}
@Override
public SqmPath<J> createSqmPath(SqmPath<?> lhs, @Nullable SqmPathSource<?> intermediatePathSource) {
final var path = PathHelper.append( lhs, this, intermediatePathSource );
final var nodeBuilder = lhs.nodeBuilder();
return switch ( classification( getJavaType() ) ) {
case TEXT -> //noinspection unchecked
(SqmPath<J>) new SqmTextValuedSimplePath(
path,
(SqmPathSource<String>) pathModel,
lhs,
nodeBuilder
);
case BOOLEAN -> //noinspection unchecked
(SqmPath<J>) new SqmBooleanValuedSimplePath(
path,
(SqmPathSource<Boolean>) pathModel,View on GitHub (pinned to fad1729dce)
Solutions
- Correct the attribute name in the path; a basic (terminal) attribute has no sub-attributes to navigate into.
When it happens
Trigger: Thrown when a query path navigates into a basic (terminal) attribute as if it had sub-attributes.
Common situations: See trigger scenarios.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/0f995f7f77d71902.
Report an issue: GitHub.