How I can do a group by year in hibernate using criteria? For example in this query:
session.CreateCriteria("Sample").SetProjection
(
Projections.ProjectionList()
.Add(Projections.Property("SampleDate"), "Name")
.Add(Projections.Max("H2"))
.Add(Projections.GroupProperty("SampleDate"))
).List();