hibernate/hibernate-orm · error · UnsupportedOperationException
Summarization is not supported by DBMS!
Error message
Summarization is not supported by DBMS!
What it means
The model-part-aware variant of resolveTableReference: it asks the from-element which physical TableReference hosts a given ValuedModelPart's table expression and throws UnknownTableReferenceException when the part's table is not reachable from this qualifier. Meaning is identical to the string variant - the column's table is missing from the current from-clause element - but the failure surfaces through the model part, so it usually points at association/inheritance mapping mismatches rather than typos.
Source
Thrown at hibernate-community-dialects/src/main/java/org/hibernate/community/dialect/CUBRIDSqlAstTranslator.java:59
@Override
protected void renderSelectTupleComparison(
List<SqlSelection> lhsExpressions,
SqlTuple tuple,
ComparisonOperator operator) {
emulateSelectTupleComparison( lhsExpressions, tuple.getExpressions(), operator, true );
}
@Override
protected void renderPartitionItem(Expression expression) {
if ( expression instanceof Literal ) {
appendSql( "'0' || '0'" );
}
else if ( expression instanceof Summarization ) {
// This could theoretically be emulated by rendering all grouping variations of the query and
// connect them via union all but that's probably pretty inefficient and would have to happen
// on the query spec level
throw new UnsupportedOperationException( "Summarization is not supported by DBMS!" );
}
else {
expression.accept( this );
}
}
}
View on GitHub (pinned to fad1729dce)
Solutions
- Join explicitly to the entity/table that owns the attribute before referencing it.
- Query the concrete subclass whose table group actually contains the named table.
- Review inheritance and secondary-table mappings named in the exception for correctness after refactors.
- Upgrade to the latest 7.x - model-part-based resolution gaps are actively patched; report HHH if reproducible.
Defensive patterns
Strategy: try-catch
Try / catch
try {
return em.createQuery(hql, type).getResultList();
} catch ( UnknownTableReferenceException e ) {
// e.g. subclass/secondary table missing from the group: query the concrete subclass or join the owner
return fallbackQueryForConcreteSubclass( e );
} Prevention
- In polymorphic hierarchies, select and order only attributes guaranteed present in every branch (or query concrete subclasses).
- Verify secondary-table and inheritance mappings after any schema refactor by translating all named queries at startup.
- Avoid referencing the inverse side of mappedBy one-to-one relations for owner-table columns; join the owner instead.
When it happens
Trigger: Resolving columns of a ValuedModelPart (basic/embedded attribute, fk, id part) whose containing table expression is not part of the table group: subclass table attributes resolved through a superclass table group, secondary tables skipped by join pruning, inverse-side (mappedBy) navigation needing owning-side tables, union-subclass branches missing a member table.
Common situations: Inheritance hierarchies (JOINED/TABLE_PER_CLASS) queried polymorphically while ordering/selecting subclass-specific columns; @OneToOne(mappedBy) traversals; @Subselect or @Synchronize mappings; upgrades that tightened table-reference resolution.
Related errors
- unsupported temporal unit for CUBRID: " + unit
- Summarization is not supported by DBMS!
- Summarization is not supported by DBMS
- Unsupported unit: " + unit
- Can't emulate '" + tableJoin.getJoinType().getText() + "join
AI-assisted analysis of hibernate/hibernate-orm@fad1729dce (2026-08-22).
Data as JSON: /api/errors/c2caa1fde060e5f9.
Report an issue: GitHub.