Top "Criteria-api" questions

This tag is for questions related to the Java Persistence Criteria API (from JPA 2.0) which is used to define queries through the construction of object-based query definition objects, rather than use of the string-based approach of the Java Persistence query language.

Delete multiple objects at once using CriteriaBuilder

I'm trying to delete a bunch of objects with one query using the CriteriaBuilder API. I'm looking for something like …

java hibernate jpa criteria-api
JPA Criteria query Path.get left join is it possible

I have a question regarding JPA criteria. Here is my JPA criteria query: CriteriaBuilder criteriaBuilder = getEm().getCriteriaBuilder(); CriteriaQuery<InventoryItemSumReport&…

jpa-2.0 java-ee-6 criteria-api
How to filter child entities collections with predicate?

I have an entity service on which I need to filter a collection of child entity, based on a list …

jpa spring-data predicate criteria-api
JPA: Query an embeddable List inside an entity

I am trying to "extract" Embeddable classes based on some criterias from a list in an Entity. Either with the …

java jpa jpql criteria-api embeddable
JPA 2.0: count for arbitrary CriteriaQuery?

I am trying to implement the following convenience method: /** * Counts the number of results of a search. * @param criteria The …

orm jpa count jpa-2.0 criteria-api
JPA Criteria: Convert int to String then select from substring of resulting String

I have a String as parameter (which is in fact a valueOf(an Integer) and want to compare it to …

java hibernate jpa criteria criteria-api
When to use the select clause in the JPA criteria API?

Without using CriteriaQuery#select() : public List<Address> getAddressOfManager(String designation, String name, String orderByColumn) { Boolean ascending = false; CriteriaBuilder …

hibernate jpa criteria criteria-api
JPA criteria query, order on class

Is there a way with JPA criteria queries to order on class? Imagine the following domain objects: abstract class Hobby { ... } …

hibernate jpa jpa-2.0 criteria-api
Criteria API limit results in subquery

I'm trying to write a query similar to select * from Table a where a.parent_id in (select b.id …

java jpa-2.0 criteria-api
Dynamic JPA 2.0 query using Criteria API

I am a bit stucked constructing a dynamic query using the CriteriaBuilder of JPA 2.0. I have quite a common use …

java dynamic jpa criteria-api jpa-2.0