Chapter 8. Query Language

The Java Persistence Query Language (JP QL) is the standard query language of JPA, but was actually spun off from the EJB Query Language (EJBQL), first introduced in EJB 2.0. JP QL is a portable query language designed to combine the syntax and simple query semantics of SQL with the expressiveness of an object-oriented expression language. Queries written using this language can be portably compiled to SQL on all major database servers.

In the last chapter, we looked at programming using the query interfaces and presented a brief introduction to JP QL for users already experienced with SQL. This chapter will explore the query language in detail, breaking the language down piece by piece with examples to demonstrate its ...

Get Pro JPA 2: Mastering the Java™ Persistence API now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.