jpa

Why you should never use getSingleResult() in JPA

As long as I’m using JPA I notice that the use of getSingleResult and getResultList is often confused. In the javadoc there is no clear specification of what to use. getResultList() Execute a SELECT query and return the query results as an untyped List. getSingleResult() Execute a SELECT query that returns a single untyped result.… Continue reading Why you should never use getSingleResult() in JPA