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.

Error on compiling query: The abstract schema type 'entity' is unknown

I'm developing a game with a database connection, and I use JPA to persist my data. Here is my Game …

java jpa persistence jpql
JPA Select latest instance for each item

Let's say I have a Meeting entity. Each meeting has a single attendee and a meeting date. Within my meeting …

java sql jpa jpa-2.0 jpql
Is there a way to use constants inside Spring Data @Query annotation value?

I don't want to hardcode constant values, I would rather specify them through a reference variable. For example, rather then …

java spring jpql spring-data
Tool to Execute JPQL Queries?

Is there any sort of tool available which allows one to execute JPQL queries against a database "directly"? I would …

java jpa jpql
What's the difference between the IN and MEMBER OF JPQL operators?

What's the difference between the IN and MEMBER OF JPQL operators?

java jpa jakarta-ee jpql
select from two tables using JPQL

I'm using JPQL to retrieve data. I can get data using the statement List persons = null; persons = em.createQuery("select …

java orm jpa-2.0 jpql openjpa
Many-to-Many query jpql

I have the followed trouble. There is an entity Distributor who is connected with the ManyToMany relationship to entity town: @…

java jpa jpa-2.0 jpql
How to convert HQL to SQL Query programmatically (without logging)

I am executing the following HQL and it is executing properly String hql = "FROM Employee"; Query query = session.createQuery(hql); …

java sql hibernate hql jpql
Fetching only first/last element using Spring Data JPA and @Query annotation

EDIT: Solutions to this problem are provided in the second and fourth answer regarding this question setMaxResults for Spring-Data-JPA annotation? …

java spring spring-data-jpa jpql
How do I count the number of rows returned by subquery?

I want to do something like this: select count(*) from (select ...) (As it would be in SQL), but in JPA. …

jpa jpa-2.0 jpql criteria-api