JPA query reworded to circumvent JPA query translation problem with 'exists' subqueries in OpenJPA