currently I am using the following to pull rows from a table called Table:
return getHibernateTemplate().find("from Table");
How do I use hibernate to pull only the first n rows from the table (i.e. like a mySql limit would do)?
Thanks.
Update: so is this the proper way to do it?
getHibernateTemplate().setMaxResults(35);
return getHibernateTemplate().find("from Table");
I ended up using a Hibernate Criteria query to do this and it works properly. I made use of the
setFirstResult()andsetLastResults()methods.