| Thank you Christian, but unfortunately it seems that countDistinct on the CriteriaBuilder uses an hard-coded count rendering defined in org.hibernate.query.criteria.internal.expression.function.AggregationFunction.COUNT and not the registered "count" function. This is very confusing. Do you know any means to override that in a custom dialect? |