Top "Jpql" questions

The Java Persistence Query Language (JPQL) is a platform-independent object-oriented query language defined as part of the Java Persistence API specification.

JPQL query with WHERE on nested fields

I have a java entity class UserBean with a list of events: @OneToMany private List<EventBean> events; EventBean …

jpa eclipselink jpql named-query
JPQL select query for ElementCollection

I have the following entity with enum collection. I would like to search the user with an enum parameter. The …

java jpa jpql
hibernate query list: empty or null?

If I have method which use Hibernate, like this: public <T> T typedQuery(Query q, Class<T&…

java hibernate list null jpql
JPA: select random row

This is my JPA ENTITY @Entity @NamedQueries({ @NamedQuery(name = "Question.randQuestion", query = "SELECT q FROM Question AS q ORDER BY …

java jpa jpql named-query
How to eagerly load lazy fields with JPA 2.0?

I have an entity class that has a lazy field like this: @Entity public Movie implements Serializable { ... @Basic(fetch = FetchType.…

java hibernate jakarta-ee jpa jpql
jpa constructor expressions with multiple SELECT NEW statements

Is there a way to have multiple SELECT NEW statements in a jpql query (Hibernate)? This works for me: @Query("…

java spring hibernate jpa jpql
How to create an 'instance of' -like query in JPA 2.0?

Say we've got an abstract @Entity Animal, and several entity classes that extend Animal, including Dog, Cat, Monkey and Bat. …

java jpa jpa-2.0 jpql
JPQL: set a column to null in an update

The following JPQL: UPDATE SignIn signIn SET signIn.cookieUUID = null WHERE signIn.user.id = :userID Gives me the following error …

java jpa jpql datanucleus
JPA : How to define @NamedEntityGraph for 3 levels?

I have 3 entities. Branch,Subject,Topic. Branch has list of subjects and Subject has list of topics. Also subjectList and …

java hibernate jpa orm jpql
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