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 API - How to add JOIN clause (as general sentence as possible)

I am trying to construct queries dynamically, and my next target is add JOIN clauses (I don't know how can …

java api join jpa-2.0 criteria-api
JPA 2.0, Criteria API, Subqueries, In Expressions

I have tried to write a query statement with a subquery and an IN expression for many times. But I …

jpa subquery jpa-2.0 criteria-api in-subquery
JPA CriteriaBuilder - How to use "IN" comparison operator

Can you please help me how to convert the following codes to using "in" operator of criteria builder? I need …

hibernate jpa orm jpa-2.0 criteria-api
JPA & Criteria API - Select only specific columns

I would like to select only specific columns (ex. SELECT a FROM b). I have a generic DAO and what …

java hibernate jpa criteria-api
Using Java generics for JPA findAll() query with WHERE clause

So, After a 10+ year break I'm coming back to Java and trying out stuff with JPA and Java generics. I've …

java generics jpa criteria-api
Compare Date entities in JPA Criteria API

Using JPA 2 with EclipseLink implementation. I'm trying to build a dynamic query which should bring me some records persisted after …

java date jpa-2.0 criteria-api
JPA Criteria API with multiple parameters

I need to make a search method that uses the JPA Criteria API with multiple parameters. Now the problem is …

java jpa criteria-api
Spring Data JPA. How to get only a list of IDs from findAll() method

I have a very complicated model. Entity has a lot relationship and so on. I try to use Spring Data …

spring spring-data-jpa specifications criteria-api
JPA/Criteria API - Like & equal problem

I'm trying to use Criteria API in my new project: public List<Employee> findEmps(String name) { CriteriaBuilder cb = …

java jpa jpa-2.0 criteria-api
Really dynamic JPA CriteriaBuilder

I need to create a "real" dynamic JPA CriteriaBuilder. I get an Map<String, String> with the statements. …

java jpa jpa-2.0 criteria-api