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.

Are SQL injection attacks possible in JPA?

I'm building a Java Web Application using Java EE 6 and JSF-2.0, using the persistence API for all database operations. The …

jpa orm sql-injection jpql
Spring Data optional parameter in query method

I want to write some query methods in repository layer. This method must ignore null parameters. For example: List<…

spring hibernate spring-data spring-data-jpa jpql
Can I get the SQL string from a JPA Query object?

May I know how can I get the sql from a JPA query? or let's say, convert the JPA query …

sql hibernate jpa logging jpql
IntelliJ IDEA highlights @Entity class names with "Cannot resolve symbol" in JPQL

IntelliJ IDEA highlights persistent @Entity class names with "Cannot resolve symbol" in red in JPQL which is distracting and buries …

jpa intellij-idea annotations jpql
JPQL statement returning boolean value

Is it possible to write JPQL query like following: select count(*) > 0 from Scenario scen where scen.name = :name that …

select jpa jpa-2.0 jpql
Is Select EXISTS() possible in JPQL?

I'm trying to run a query that checks if some conditions are true and returns a simple boolean result as …

jakarta-ee jpa jpa-2.0 jpql
JPQL Like Case Insensitive

I want to search data in User table by name case insensitive. @Repository public interface UserRepository extends JpaRepository<User, …

java spring jpa spring-data-jpa jpql
JPA JPQL: select items when attribute of item (list/set) contains another item

public class Document extends Model { ... @ManyToMany public Set<User> accessors; ... } I want to select all Documents which accessors …

list jpa set jpql
TypedQuery instead of normal Query in JPA

Is it possible to write this Query as a TypedQuery and let the two Long's run into a Object with …

jakarta-ee jpa glassfish-3 jpql
Using @EmbeddedId with JpaRepository

I have simple Entitly class with the @EmbeddedId (Integer and String fields in separate class). And I use the Spring …

java spring jpa jpql spring-data