JPQL JOINS with nested SELECT

前端 未结 2 2060
Happy的楠姐
Happy的楠姐 2020-12-20 17:44

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         


        
2条回答
  •  Happy的楠姐
    2020-12-20 18:31

    No, you can't. Quote from the documentation:

    Note that HQL subqueries can occur only in the select or where clauses.

提交回复
热议问题