Chapter 7. EJB-QL: The Object Query Language
EJB3-QL has been heavily inspired by HQL, the native Hibernate Query Language. Both are therefore very close to SQL, but portable and independent of the database schema. People familiar with HQL shouldn't have any problem using EJB-QL. Actually, you use the same query API for EJB-QL and HQL queries. For an EJB3 application to remain portable, it should use EJB-QL without vendor-specific extensions.
7.1. Case Sensitivity
Queries are case-insensitive, except for names of Java classes and properties. So
SeLeCT is the same as
sELEct is the same as
org.hibernate.eg.FOO is not
foo.barSet is not
This manual uses lowercase EJBQL keywords. Some users find queries with uppercase keywords more readable, but we find this convention ugly when embedded in Java code.