I am rather new to JPA 2 and it's CriteriaBuilder / CriteriaQuery API:
http://java.sun.com/javaee/6/docs/api/javax/persistence/criteria/CriteriaQuery.html
http://java.sun.com/javaee/6/docs/tutorial/doc/gjivm.html
I would like to count the results of a CriteriaQuery without actually retrieving them. Is that possible, I did not find any...
I love the type safety CriteriaQuery brings ing JPA 2.0 but it also brings a bit of boiler-plate code. For example, let say I have an entity called NamedEntity, which simply has an id and a String field called "name" (assume it has the unique constraint set to true). Here's what the NamedEntityManager might look like:
public class Named...
Guys,
maybe it's a silly question but I cannot find the answer in the docs:
How can set a limit to the CriteriaQuery using JPA2?
Thanks
...