基本映射' subject.errCode'不能与=运算符一起使用

时间:2017-11-16 12:50:46

标签: spring hibernate jpa

我正在将hibernate迁移到spring数据jpa,它为namedquery

提供了错误
    {@NamedQuery(name = "student.HSLoad", query = " FROM Student student WHERE CAST(SUBSTRING(student.nameId,2,12) AS long) >CAST( :value1 AS long) AND CAST(SUBSTRING(student.nameId,2,12) AS long)<= CAST( :value2  AS long) AND student.nameId is not null and not exists(select distinct nameId from Subject subject where student.nameId=subject.nameId  and  not exists(SELECT secondary FROM ListLibrary listLibrary WHERE  primary='Mem Conversion Errors' and text like '%;W' and secondary = subject.errCode ))")}

as
[363, 384] The basic mapping 'subject.errCode' cannot be used in conjunction with the = operator.
[135, 141] The identification variable 'nameId' is not defined in the FROM clause.
[248, 257] The identification variable 'secondary' is not defined in the FROM clause.
[293, 300] The identification variable 'primary' is not defined in the FROM clause.
[331, 335] The identification variable 'text' is not defined in the FROM clause.
[351, 360] The identification variable 'secondary' is not defined in the FROM clause.
[135, 141] The identification variable 'nameId' is not defined in the FROM clause. 

0 个答案:

没有答案