0
我想用@NamedQueries
註解來運行多個查詢,但它給錯誤:多JPA查詢錯誤
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 ")
})
我是否需要在一些地方定義這個註解?
很酷。你明白了。謝謝 ! – 2013-05-07 06:31:53
然後投票答案。謝謝! – 2013-05-07 06:35:01
通常,如果您使用的是Eclipse,可以使用Ctrl + Shift + O解決此問題「automatcaly」。問候, – 2013-05-07 12:27:52