O'Reilly logo

Hibernate Recipes: A Problem-Solution Approach by GARY MAK, SRINIVAS GURUZU

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 8. HQL and JPA Query Language

When you use JDBC to access databases, you write SQL statements for the query and update tasks. In such cases, you're dealing with tables, columns, and joins. When you use Hibernate, most update tasks can be accomplished through the APIs provided by Hibernate. However, you still need to use a query language for the query tasks. Hibernate provides a powerful query language called Hibernate Query Language (HQL).

HQL is database independent and translated into SQL by Hibernate at runtime. When you write HQL, you can concentrate on the objects and properties without knowing much detail about the underlying database. You can treat HQL as an object-oriented variant of SQL.

In this chapter, you see how to query the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required