Hibernate is equipped with an extremely powerful query language that (quite intentionally) looks very much like SQL. But don't be fooled by the syntax; HQL is fully object-oriented, understanding notions like inheritence, polymorphism and association.
Queries are case-insensitive, except for names of Java classes and properties.
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 we find this convention ugly when embedded in Java code.