Hibernate Query Language

Hibernate Query Language is an object-oriented query language that works on persistence objects and their properties instead of operating on tables and columns. Hibernate will translate HQL queries into conventional SQL queries during the interaction with a database.

Even though you can use SQL queries using native SQL directly with Hibernate, it is recommended that you use HQL to get the benefits of Hibernate's SQL generation and caching strategies.

In HQL, keywords such as SELECT, FROM, WHERE, GROUP BY, and so on are not case sensitive but properties such as table and column names are case sensitive. So org.packt.spring.chapter6.hibernate.model.Employee is not same as org.packt.spring.chapter6.hibernate.model.EMPLOYEE ...

Get Spring: Developing Java Applications for the Enterprise now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.