lundi 3 août 2015

Hibernate query - get a maximum of latest 50 rows, sorted by date ascending - HQL

There is a message entity, which has date variable. I want to get a maximum of 50 messages, sorted by date ascending and if there are more than 50 I only want the latest 50 messages.

How would a query look like?

Aucun commentaire:

Enregistrer un commentaire