What does JPA EntityManager.getSingleResult() return for a COUNT query?
As per the JPA specification, COUNT returns a Long: 4.8.4 Aggregate Functions in the SELECT Clause The result of a query may be the result of an aggregate function applied to a path expression. The following aggregate functions can be used in the SELECT clause of a query: AVG, COUNT, MAX, MIN, SUM. For all … Read more