我在 EJB-QL 中有以下几个 EJB 2.1 finder 方法:
SELECT distinct OBJECT(rd) FROM RequestDetail rd, DetailResponse dr
WHERE dr.updateReqResponseParentID is not null
and dr.updateReqResponseParentID = ?1
and rd.requestDetailID = dr.requestDetailID
and rd.deleted is null and dr.deleted is null
IDEA 的 EJB-QL 检查标记了这两个对象的FROM RequestDetail rd, DetailResponse dr
使用,检查表明:Several ranged variable declarations are not supported, use collection member declarations instead (e.g. IN(o.lineItems))
查询本身在 JBoss 4.2 上运行良好(作为返回预期结果)。IDEA 是不是全都湿了,还是查询存在有效问题?这种查询的实际首选替代语法是什么?
编辑:感谢所有回答者的帮助,尤其是罗曼。我将此作为问题报告给 JetBrains。