本文介绍了hql中的新关键字如何工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  select new family(mother,mate,offspr)
from DomesticCat作为母亲
加入mother.mate作为mate
离开join mother.kittens as offspr

Family 类来自何处。我需要导入某处,或者使用它的完全限定的类名吗?

Family 是一个普通的POJO,它具有适当的构造函数,它需要声明或完全限定。

I found this example in jboss's documentation.

select new Family(mother, mate, offspr)
from DomesticCat as mother
    join mother.mate as mate
    left join mother.kittens as offspr

Where does the Family class come from. Do I need to import somewhere, or to use its fully qualified class name?

解决方案

The Family is a plain POJO with the appropriate constructor which either needs to be declared or fully qualified.

这篇关于hql中的新关键字如何工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 15:06