I'm trying to get the list of only the last five rows from the table. I've already tried with limit 5
but no luck .
Here is the method
@Transactional
public List<Poll> findAllLimit5() {
return em.createQuery("select a from Poll a ", Poll.class).getResultList();
}
Any help is much appreciated.