Criteria JPA 2 with 3 tables
I'm trying to create a criteria to retrieve some objects from 3 tables (Associate, Update and Detail). A Detail has reference to Associate and Update, and an Update has reference to a list of Details. My objective is to retrieve a list of Updates that has at least a Detail with null value in a specified field, given an Associate id. In JPQL was easy to do but the client said that this must be coded with criteria. My JPQL was: public List<Update> getUpdates(long associateId) { TypedQuery<Update> query = em.createQuery("select distinct u from Update u, Detail dt, Associate a " + "where dt.update