Fixed JPQL query to conform with JPA 2.1.