Can I do something like this on JPQL?
SELECT NEW com.MyDTO(p.a, p.b, q.c, q.d) FROM (SELECT r.* FROM MyDTO1 r ) p LEF
No, you can't. Quote from the documentation:
Note that HQL subqueries can occur only in the select or where clauses.