syntax like this criteriaBuilder.treat(root, SubClass.class).fetch("subClassField", JoinType.LEFT); is not working, since only joins are present here https://github.com/hibernate/hibernate-orm/blob/9ff14a33c78b11f03351748dfe4a5610517325f3/hibernate-core/src/main/java/org/hibernate/query/criteria/internal/QueryStructure.java#L308
I tried to add
renderFetches( jpaqlQuery, renderingContext, treat.getFetches() );
to the next line and it seems to work. Maybe it was intended and I am missing something?