Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Hibernate

You're reading from   Mastering Hibernate Learn how to correctly utilize the most popular Object-Relational Mapping tool for your Enterprise application

Arrow left icon
Product type Paperback
Published in May 2016
Publisher Packt
ISBN-13 9781782175339
Length 204 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

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 online documentations for a complete reference.

When composing HQL statements, you should be aware of the following:

  • HQL is case insensitive, except when you are referring to entity classes. It's a convention to use lowercase for all HQL keywords...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image