我想使用@NamedQueries
注释运行多个查询,但它给出的错误是:
1. The attribute value is undefined for the annotation typed NamedQueries
2.NamedQueries can not be resolved to a type
以下是代码:
@NamedQueries({
@NamedQuery(name="findAllBookItems",
query = "SELECT i FROM Book i where i.isbn > 1 "),
@NamedQuery(name="findAllCDItems",
query = "SELECT c FROM CD c where c.numberofcds >=0 ")
})
我需要在某处定义这个注释吗?