EntityGraph<EmailMessage> eg = em.getEntityGraph("previewEmailEntityGraph");
List<EmailMessage> messages = em.createNamedQuery("findAllEmailMessages")
.setParameter("mailbox", "inbox")
.setHint("javax.persistence.loadgraph", eg)
.getResultList();