Hibernate Query Language
Hibernate offers its own query language, called HQL, which resembles SQL in many ways but also supports additional features. There are some differences, for example, instead of the table name, you simply use the entity name and Hibernate will figure out the table name. This is because both HQL and JPA Query Language (JPQL) use an object model, and both languages are considered to be object-oriented and support polymorphism and inheritance concepts.
In this section, we'll focus on HQL and also how Hibernate supports native SQL. However, this section is not meant to be a language reference for HQL; this is indeed a powerful language and most likely deserves its own book. For now, it is highly recommended that you read the ...
Get Mastering Hibernate 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.