Thanks for the reply Christian!
Is there also a way of doing this random query and select query limit using Hibernate without applying specific functions from the db in the HQL (for example rand() and limit in MySQL). I'm thinking of something like an API class or method that I can use in Hibernate (if there's any). As much as possible I'm refraining from using db specific functions in the HQL.
christian wrote:
The order by clause in HQL is passed through to the database, so you can use any function. This and your other question is answered in the HQL chapter of the reference documentation.