Java JPA-枚举联接(JPQL)
我得到了以下JPQL查询:Java JPA-枚举联接(JPQL),java,jpa,join,enums,jpql,Java,Jpa,Join,Enums,Jpql,我得到了以下JPQL查询: select cio from CadastralIncomeObjection cio where cio.dateInput < :maxValidInputDate and cio.active = true and cio.reasonInValid.valid = false " + "and exists (select dd from DocumentDossier dd join dd.documents d where dd.i
select cio from CadastralIncomeObjection cio where cio.dateInput < :maxValidInputDate and cio.active = true and cio.reasonInValid.valid = false "
+ "and exists (select dd from DocumentDossier dd join dd.documents d where dd.id = cio.id and d.attachmentType = be.ejb.model.entity.admin.option.REPORT)"
我得到的错误是:
unknown identification variable [be]. The FROM clause of the query does not declare an identification variable [be]
问题解决了。。
忘记在包声明后包含“AttachmentType”
unknown identification variable [be]. The FROM clause of the query does not declare an identification variable [be]