JPA HQL:在构造函数中使用字节数组选择新的Object

时间:2014-11-26 13:10:02

标签: java eclipse hibernate jpa hql

伙计们,我希望有人可以帮助我,首先对不起我的英语。

我试图像这样进行查询:

SELECT new com.enterprise.entity.ObjectExample(oe.id, oe.image) FROM ObjectExample

我有一个像这样的构造函数:

public ObjectExample(Long id, byte[] image){
    this.id = id;
    this.image = image;
}

但是在我的eclipse中继续显示这个错误:"没有找到与参数类型匹配的构造函数。"

它编译正常并且代码运行正常,但是我想在我的eclipse中忽略这个错误或者以另一种方式构建一个构造函数。

提前致谢。

0 个答案:

没有答案
相关问题