Using Java Persistence Query Language (JPQL)


In the preceding chapter, you saw how you can find and retrieve an entity instance by primary key with the help of the EntityManager’s find method. This method of retrieving entities has at least two serious limitations, however. First, you are limited to using primary keys only. Second, you can retrieve only a single entity instance at a time. In practice, however, you may need to retrieve a set of entity instances, based on a condition defined over entity attributes. This is where Java Persistence Query Language (JPQL) comes to the rescue.


Query Execution Query Interface Employee Instance Query Instance Preceding Chapter 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Yuli Vasiliev 2008

Personalised recommendations