About jpql

manual

JPA Query Structure (JPQL / Criteria)

Explains the structure of a JPQL query, which consists of 6 clauses: SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY. The syntax of the Java Persistence Query Language (JPQL) is very similar to the syntax of SQL. Having a SQL like syntax in JPA ... with it. The main difference between SQL and JPQL is that SQL works with relational database tables, records and fields, ...

 
manual

JPA Query Expressions (JPQL / Criteria)

Describes JPA query (JPQL / Criteria API) expressions (literals, operators and functions). Query expressions are the foundations on which JPQL and criteria queries are built. Every query consists of clauses ... GROUP BY, HAVING and ORDER BY, and each clause consists of JPQL / Criteria query expressions. Atomic Expressions The ...

 
manual

WHERE clause (JPQL / Criteria API)

Explains how to use the WHERE clause in a JPQL query.... to the FROM-SELECT structure. It is essential in any JPQL query that retrieves selective objects from the database. Out of the four optional clauses of JPQL queries, the WHERE clause is definitely the most frequently used. ...

 
manual

Chapter 4 - JPA Queries (JPQL / Criteria)

Describes the Java Persistence Query Language (JPQL), the JPA Criteria API, and explains how to use queries in JPA. The JPA Query Language (JPQL) can be considered as an object oriented version of SQL. Users familiar with SQL should find JPQL very easy to learn and use. This chapter explains how to use JPQL as well as how to use the JPA Criteria API, which provides an alternative ...

 
manual

FROM clause (JPQL / Criteria API)

Explains how to use the FROM clause and JOIN expressions in a JPA/JPQL query.... classes). Identification variables are always polymorphic. JPQL does not provide a way to exclude descendant classes from iteration at the ... c By default, the name of an entity class in a JPQL query is the unqualified name of the class (e.g. just Country with no ...

 
manual

SELECT clause (JPQL / Criteria API)

Explains how to use the SELECT clause and projections in a JPA/JPQL query.... to retrieve managed entity objects is a major advantage of JPQL. For example, the following query returns Country objects that become ... objects. JPA 2 adds the ability to use almost any valid JPQL expression in SELECT clauses. Specifying the required query results more ...

 
manual

Literals in JPQL and Criteria Queries

Describes literals in JPQL, including null, false, true, numbers, strings, dates enums and types. Literals in JPQL, as in Java, represent constant values. JPQL supports various types of literals including NULL , boolean literals ( ... ) and entity type literals (e.g. Country ). JPQL literals should be used sparingly as queries that use parameters ...

 
manual

DELETE Queries in JPA/JPQL

Explains how to apply server side bulk delete using a JPA/JPQL query.... database by calling the commit method. JPQL DELETE queries provide an alternative way for deleting entity ...

 
manual

UPDATE SET Queries in JPA/JPQL

Explains how to apply server side bulk update using a JPA/JPQL query.... database by calling the commit method. JPQL UPDATE queries provide an alternative way for updating entity ...

 
manual

ORDER BY clause (JPQL / Criteria API)

Explains how to use the ORDER BY clause in a JPA/JPQL query.... specifies a required order for the query results. Any JPQL query that does not include an ORDER BY clause produces results in an ... BY c . population When using ObjectDB, any JPQL expression whose type is comparable (i.e. numbers, strings and date ...