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.

How do I query "older than three minutes" in JPA?

Is there a way to put a date range condition referencing the current time in a JPA query (that is …

datetime jpa jpql
JPQL, How to NOT select something

I have a pretty simple SQL I need to perform. I have a ProcessUser, Role and a ProcessUserRole table. A …

jpa jpql
Recursive JPA query?

Does JPA 2 have any mechanism for running recursive queries? Here's my situation: I have an entity E, which contains an …

java orm jpa-2.0 jpql recursive-query
JPQL ManyToMany select

I have a Many To Many relationship between two entities called: Car and Dealership. In native MySQL I have: car (…

java database jakarta-ee jpa jpql
JPA - Returning entities that are After StartDate and Before EndDate

I have two dates in my entity. ie. Date startDate; Date endDate; How do I query so that given a …

java spring date spring-data-jpa jpql
How do I do a "deep" fetch join in JPQL?

I don't think I will ever fully understand fetch joins. I have a query where I'm attempting to eagerly "inflate" …

jpa jpql
JPA: How to fetch eagerly an embedded element collection

Consider the following model @Entity // JPA and JAXB annotations here public class Employee implements Serializable { // other fields, annotations, stuffs ... @ElementCollection(…

java hibernate jpa jpql
How to use projections and specifications with spring data jpa?

I'm not able to use Spring Data JPA projections and specifications together. I have the following setup: Entity: @Entity public …

hibernate spring-boot spring-data-jpa jpql
JPA 3-way join annotation

There are three tables modeled as three entities: @Entity @Table(name="event") public class Event { public Long datetime; public String …

java jpa orm jpql
JPA: java.lang.StackOverflowError on adding toString method in entity classes

Everything worked fine until I added toSting() in my entity classes. After which I start getting the following error in …

hibernate stack-overflow jpql tostring jpa-2.1