【发布时间】:2011-01-22 06:43:41
【问题描述】:
我最近了解到,可以在JPQL 语句中创建新对象,如下所示:
select new Family(mother, mate, offspr)
from DomesticCat as mother
join mother.mate as mate
left join mother.kittens as offspr
这是应该避免还是应该接受的事情?根据良好做法,何时使用此功能是合理的?
【问题讨论】:
标签: java hibernate orm jpa jpql