1

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();
user1096760
  • 87
  • 2
  • 8

0 Answers0