Home Select top 1 result using JPA
 I need to bring from DB only one single result. How can I do that with JPA? Select top 1 * from table  I tried "select t from table t" query.setMaxResults(1); query.getSingleResult();  but didn't work. Any other ideas?