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.

Criteria api query in Hibernate with not exist

Im trying to write query, which returns me list of Drivers wich is not assigned to route. My database a …

hibernate jpa criteria-api not-exists
jpa lazy fetch entities over multiple levels with criteria api

I am using JPA2 with it's Criteria API to select my entities from the database. The implementation is OpenJPA on …

jpa jpa-2.0 fetch criteria-api openjpa
Does Hibernate Criteria Api completely protect from SQL Injection

I am working with Hibernate to protect my website from SQL Injection. I heard that Hibernate Criteria API is more …

java hibernate sql-injection criteria-api hibernate-criteria
JPA 2 -- Using @ElementCollection in CriteriaQuery

@Entity public class Person { @ElementCollection private List<Location> locations; [...] } @Embeddable public class Location { private Integer dummy; private Date …

java orm jpa jpa-2.0 criteria-api
Initializing a transient attribute of a JPA entity during CriteriaQuery

I'm wondering if it is possible to initialize a transient attribute of an entity during a criteria query. Example @Entity …

java jpa-2.0 criteria-api
Complex Search Queries JPA

In my Wicket+JPA/Hibernate+Spring project, much of the functionality is based around the Inbox page where, using many …

java annotations jpa-2.0 criteria-api
Tuple result Criteria API subquery

I am trying to use subqueries in an application I am writing using JPA 2.0 type-safe criteria API, with Hibernate 3.6.1.Final …

jpa subquery criteria jpa-2.0 criteria-api
Using JPA2 criteria API without Metamodel on a List property

How can I formulate the following JPA2 criteria query without using the metamodel classes: CriteriaBuilder cb = em.getCriteriaBuilder(); CriteriaQuery<…

java orm jpa jpa-2.0 criteria-api
Criteria API Path to sub-sub-entity id

I want to transform my JPAQL queries into criteria API queries. Consider query like this: SELECT e FROM Entity e …

jpa-2.0 criteria-api
How to refer to a subclass specific field in a CriteriaQuery where the super class is queried?

I'm trying to achieve something like the following, using the JPA Criteria API: SELECT b FROM Box b JOIN SpecialItem …

jpa criteria-api