Spring: Developing Java Applications for the Enterprise
by Ravi Kant Soni, Amuthan Ganeshan, Rajesh RV
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access