hibernate/hibernate-orm · error · UnsupportedOperationException
This is not supported yet!
Error message
This is not supported yet!
What it means
Error "This is not supported yet!" thrown in hibernate/hibernate-orm.
Source
Thrown at hibernate-core/src/main/java/org/hibernate/query/specification/internal/CountProjectionSpecificationImpl.java:42
import java.util.Map;
import static java.util.Collections.emptyMap;
/**
* @author Gavin King
*/
public class CountProjectionSpecificationImpl<T> implements SimpleProjectionSpecification<T,Long>, JpaTypedQueryReference<Long> {
private final SelectionSpecification<T> selectionSpecification;
public CountProjectionSpecificationImpl(@Nonnull SelectionSpecification<T> specification) {
this.selectionSpecification = specification;
}
@Nonnull
@Override
public QuerySpecification<T> restrict(@Nonnull Restriction<? super T> restriction) {
throw new UnsupportedOperationException( "This is not supported yet!" );
}
@Nonnull
@Override
public SelectionQuery<Long> createQuery(@Nonnull EntityHandler entityHandler) {
return entityHandler.unwrap( SharedSessionContract.class )
.createQuery( buildCriteria( entityHandler.getCriteriaBuilder() ) );
}
@Nonnull
@Override
public CriteriaQuery<Long> buildCriteria(@Nonnull CriteriaBuilder builder) {
var impl = (SelectionSpecificationImpl<T>) selectionSpecification;
// TODO: handle HQL, existing criteria
final var tupleQuery =
(SqmSelectStatement<Long>)
builder.createQuery( getResultType() );
final var root = tupleQuery.from( impl.getResultType() );View on GitHub (pinned to fad1729dce)
Solutions
- This count-projection specification operation is not supported yet. Use an equivalent explicit count query.
When it happens
Trigger: A code path that Hibernate has not implemented is exercised: This is not supported yet!
Common situations: Using newer/edge API features (certain projections, specifications, fetch mementos, composite-path native mappings, null keys in key-based pagination) that are present but not yet implemented.
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/1cf9621ab051f8dc.
Report an issue: GitHub.