| It would be nice to be able to do explicit typesafe joins on unrelated entities with HQL. Something like that: entityManager.createQuery("SELECT a FROM FirstClass a " + "JOIN SecondClass b " + "on a.name = b.name", FirstClass.class, SencondClass.class); Or maybe with the CriteriaBuilder... |