我正在使用Vaadin的JPAContainer来添加where子句,但是如何使用group by?
data.getEntityProvider().setQueryModifierDelegate(
new DefaultQueryModifierDelegate() {
@Override
public void filtersWillBeAdded(CriteriaBuilder criteriaBuilder, CriteriaQuery<?> query, List<Predicate> predicates) {
super.filtersWillBeAdded(criteriaBuilder, query, predicates);
//Where clauses
//query.groupBy(fromEntity.get(groupByColName)); ???
}
}
我收到错误
result returns more than one elements
答案 0 :(得分:0)
也许为时已晚......
我开了一张票 http://dev.vaadin.com/ticket/14484
和
推了一个补丁 https://dev.vaadin.com/review/#/c/4365/
试试吧