Code:
List<SimplePaperEod> list = new ArrayList<SimplePaperEod>();
Criteria crit = getSession(false).createCriteria(SimplePaperEod.class);
ProjectionList projList = Projections.projectionList();
projList.add(Projections.max("date"));
projList.add(Projections.min("date"));
projList.add(Projections.groupProperty("paperName"));
crit.setProjection(projList);
list = crit.list();
return list;
it retrieves the right data , only problem it's projectins :) so i'm not getting the entity just the fields i asked for how can i transform those "restrictions" into criteria lang. so i'll get basicly two entities per paperName the min and the max ??
a bit confused here , thanks in advance .