0

How can we implement the following query using Hibernate criteria api

select * from User where date = select min(date) from User

where User have a column named date

JamesHalsall
  • 13,224
  • 4
  • 41
  • 66
RageshAK
  • 103
  • 1
  • 4
  • 12
  • 1
    duplicate - http://stackoverflow.com/questions/3900105/get-record-with-max-id-using-hibernate – gkamal Dec 09 '11 at 10:34

1 Answers1

0

You have the Projections class for that which help for all aggregate/groupby stuff. http://www.163jsp.com/help/hibernate32api/org/hibernate/criterion/Projections.html

Sebastien Lorber
  • 89,644
  • 67
  • 288
  • 419