私は、hibernate create criteriaクエリーでgroup by節を使って数値フィールドの合計を求めています。私は私が取得できますかnot a group by clause could not execute query
grailsのHibernateCriteriaBuilderを使用してcreateCriteriaからすべてのフィールドを抽出します
を言っ例外がわからない得るgrouProperty()ラインと一緒に投影して用語property('seriesType')
を追加した場合、今出力resultlistのドメインクラスからseriesType
、しかし - 私は別の列を必要とします結果 内の他の2と一緒にそのフィールドは、ここであなたがgroupProperty('seriesType')
ないproperty('seriesType')
を追加する必要があり、私の基準
dataMap = BehaviorProfile.createCriteria().list {
globalUser{
eq('id',empid2)
}
projections{
sum('frequency', 'tfreq')
groupProperty('dayofweek')
// if I add property('seriesType') here the criteria throws an exception
}
}