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 SELECT between date statement

I would like to convert this SQL statement to a JPQL equivalent. SELECT * FROM events WHERE events_date BETWEEN '2011…

java sql jpa jpql
What is the LIMIT clause alternative in JPQL?

I'm working with PostgreSQL query implementing in JPQL. This is a sample native psql query which works fine, SELECT * FROM …

java mysql jpa spring-data-jpa jpql
a new object was found through a relationship that was not marked cascade PERSIST

In trying to get a @OneToMany relationship between Article and HeaderField I probably have the mapping not quite right, resulting …

jpa orm annotations many-to-many jpql
JPA: Query that returns multiple entities

I'm writing a JPQL query that joins across three tables. In my resultlist I would like to get all three …

java hibernate jpa jpql
Doing an "IN" query with Hibernate

I have a list of IDs in a String, and want to use Hibernate to get the rows with these …

java hibernate orm jpa jpql
JPQL Create new Object In Select Statement - avoid or embrace?

I've learnt recently that it is possible to create new Objects in JPQL statements as follows: select new Family(mother, …

java hibernate orm jpa jpql
How do I do a JPQL SubQuery?

It is possible to do the equivalent of this sql query in JPQL? SELECT * FROM COUNTRIES c WHERE COUNTRY_ID …

java orm jpa jpql
JPQL limit query

How can I limit in a select query of JPQL named query? I need the limit to be done in …

java jpa-2.0 limit jpql
Setting a parameter as a list for an IN expression

Whenever I try to set a list as a parameter for use in an IN expression I get an Illegal …

java jpa glassfish jpql toplink-essentials
How to write JPA query with boolean condition

In my project i am using JPA 2.0 with eclipselink inplementation, an I have following problem: I have defined entity with …

jpa-2.0 eclipselink jpql