- 15.1. Case Sensitivity
- 15.2. The from clause
- 15.3. Associations and joins
- 15.4. Forms of join syntax
- 15.5. Referring to identifier property
- 15.6. The select clause
- 15.7. Aggregate functions
- 15.8. Polymorphic queries
- 15.9. The where clause
- 15.10. Expressions
- 15.11. The order by clause
- 15.12. The group by clause
- 15.13. Subqueries
- 15.14. HQL examples
- 15.15. Bulk update and delete
- 15.16. Tips & Tricks
- 15.17. Components
- 15.18. Row value constructor syntax
Hibernate uses a powerful query language (HQL) that is similar in appearance to SQL. Compared with SQL, however, HQL is fully object-oriented and understands notions like inheritance, polymorphism and association.
With the exception of names of Java classes and properties, queries are case-insensitive. So
SeLeCT is the same as sELEct is the same as SELECT, but org.hibernate.eg.FOO is not org.hibernate.eg.Foo, and foo.barSet is not foo.BARSET.
This manual uses lowercase HQL keywords. Some users find queries with uppercase keywords more readable, but this convention is unsuitable for queries embedded in Java code.