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.

JPA criteria query load entire table

I feel like this is a silly question, but I can't find the answer. I have a class as follows: …

jpa criteria-api
Using Projections in JPA 2

I need to convert a Hibernate criteria query like the following curList = session.createCriteria(Islem.class) .createAlias("workingDay", "d") .setProjection(…

hibernate jpa-2.0 projection criteria-api hibernate-criteria
What does an underscore concatenated to a class name mean?

I was reading the "Dynamic, typesafe queries in JPA 2.0" article and stumbled upon this example: EntityManager em = ... CriteriaBuilder qb = em.…

java jpa criteria-api
JPA Criteria API: how to express literal true and literal false?

How can I express literal true and literal false in JPA's Criteria API? I'm looking for something like Predicate alwaysTrue = …

jpa criteria-api
Spring data JPA Specifications - @OneToMany dependency

i have a problem with getting List from entity Person using Spring data JPA specifications (because of pagination). I need …

spring jpa criteria-api specifications spring-data-jpa
Need help creating JPA criteria query

I'm building my first Java EE web application using Glassfish and JSF. I'm fairly new to the criteria query and …

java jpa criteria-api
Usage of Coalesce or Case statement in JPA

How to use coalesce or case statement in JPA 2 using CriteriaBuilder For many records initiatedBy will be empty and as …

hibernate jpa jpa-2.0 criteria-api coalesce
truncate/delete from given the entity class

I have my entity class available via a method. I'm trying to figure out, how via the JPA JPQL or …

java jpa criteria criteria-api
JPA criteria API order by NULL last

I use JPA criteria API to fetch records from the datebase. I have entity Record with field dateTime which can …

java jpa criteria-api
Criteria API: Fetch of a list returns repeated main entity

I have the following Entities; Ticket contains a set of 0,N WorkOrder: @Entity public class Ticket { ... @OneToMany(mappedBy="ticket", cascade = …

jpa jpa-2.0 criteria-api