I was wondering if it's possible to create such query like :
em.createQuery(
"SELECT NEW EmpMenu(p.name, p.department.name) "
+ "FROM Project p ").getResultList();
also is it possible to do it via Specification:
public Predicate toPredicate(Root<T> root, CriteriaQuery<?> query,
CriteriaBuilder cb) {
return ???;
}
Thanks in advance!