Yes, absolutely retarded but the JPA spec allows identification variables (aliases) to be used in case-insensitive manner. For example select P from Person p is perfectly valid JPQL.