 <p>Instead of mapping the result to a POJO, I would suggest creating entities for both classes and mapping them with the one to one annotation JPA provides:</p> <pre><code>@Entity public class User{ @Id private long id; @OneToOne @JoinColumn(name="GROUP_ID") private Group group; ... } @Entity public class Group{ @Id private long id; ... } </code></pre> <p>Update to reflect updated question: You could then use e.g. the Criteria-API (or named queries), to query these entities:</p> <pre><code>CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder(); CriteriaQuery criteriaQuery = criteriaBuilder.createQuery(); Root user = criteriaQuery.from(User.class); criteriaQuery.where(criteriaBuilder.equal(user.get("id"), criteriaBuilder.parameter(Long.class, "id"))); Query query = entityManager.createQuery(criteriaQuery); query.setParameter("id", id); User result = (User)query.getSingleResult(); </code></pre> <p><a href="https://en.wikibooks.org/wiki/Java_Persistence/Criteria" rel="nofollow">Source: Wikibooks on JPA</a></p>