我怎样才能变换分析下面的查询休眠的标准?
select pr_name, count(*) from (select (case when serv.type=xyz then serv.nameA else serv.nameB end) as pr_name from db.serv serv where serv.date is null group by pr_name;
我得处理其余部分(除壳体部分)以下
currentSession.createCriteria(StoredData.class)
.setProjection(projectionList()
.add(groupProperty("pr_name"), "pr_name")
.add(rowCount(), "count"))
.add(isNull("date"))
.setResultTransformer(new PrCountTransformer())
.list();