Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/ant/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java JPA HQL:在构造函数中选择具有字节数组的新对象_Java_Eclipse_Hibernate_Jpa_Hql - Fatal编程技术网

Java JPA HQL:在构造函数中选择具有字节数组的新对象

Java JPA HQL:在构造函数中选择具有字节数组的新对象,java,eclipse,hibernate,jpa,hql,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; } 我有一个这样的构造函数: SELECT new com.enterprise

伙计们,我希望有人能帮助我,首先为我的英语感到抱歉

我正在尝试这样的查询:

SELECT new com.enterprise.entity.ObjectExample(oe.id, oe.image) FROM ObjectExample
public ObjectExample(Long id, byte[] image){
    this.id = id;
    this.image = image;
}
我有一个这样的构造函数:

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中忽略这个错误,或者用另一种方式创建一个构造函数


提前感谢。

我找到的临时解决方案是为每个无效或不完整的JPQL查询设置警告错误。要在EclipseLuna中执行此操作,我遵循以下说明:1-“窗口”/“首选项”2-“Java持久性”->“JPA”->“错误/警告”3-“无效或不完整的JPQL查询:”设置为“警告”。但这根本不是解决方案。你能写出任何成功的ObjectExample查询吗?例如
从对象中选择oe示例oe