Top "Jpa-2.0" questions

This tag is for questions about the version 2.0 of the Java Persistence API.

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 CascadeType.ALL does not delete orphans

I am having trouble deleting orphan nodes using JPA with the following mapping @OneToMany (cascade = CascadeType.ALL, fetch = FetchType.EAGER, …

java hibernate orm jpa jpa-2.0
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
In JPA 2, using a CriteriaQuery, how to count results

I am rather new to JPA 2 and it's CriteriaBuilder / CriteriaQuery API: CriteriaQuery javadoc CriteriaQuery in the Java EE 6 tutorial I …

java jpa-2.0 criteriaquery
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 Query selecting only specific columns without using Criteria Query?

Is it possible to select, say, only properties A and B from an object using a JPA query without using …

java jpa jpa-2.0 jpa-2.1 criteriaquery
How to define unidirectional OneToMany relationship in JPA

I have a following problem with entity mapping in JPA. I have two entities, first one is Lookup and the …

java jpa jpa-2.0
How to properly express JPQL "join fetch" with "where" clause as JPA 2 CriteriaQuery?

Consider the following JPQL query: SELECT foo FROM Foo foo INNER JOIN FETCH foo.bar bar WHERE bar.baz = :baz …

java jpa criteria jpa-2.0
JPA: unidirectional many-to-one and cascading delete

Say I have a unidirectional @ManyToOne relationship like the following: @Entity public class Parent implements Serializable { @Id @GeneratedValue private long …

java jpa jpa-2.0 many-to-one
JPA With Hibernate Error: [PersistenceUnit: JPA] Unable to build EntityManagerFactory

I have a problem with Java Persistence API and Hibernate. My situation of project is: My persistence.xml file is: &…

eclipse hibernate jpa-2.0 entitymanager