我的问题非常简单明了。我需要在生成的实体类中添加一个 @NamedQueries 注释。JPA 层是使用 Hyperjaxb 生成的。我不知道如何使用添加此行的元素
...
@NamedQueries(value = {
@NamedQuery(name ="SampleType.sampleQuery", query="select r from SampleType r where r.index=:index"),
})
public class SampleType{
....
}
如何将该特定注释添加到生成的类型?
<bindings node="xsd:complexType[@name='SampleType']">
.... // What do I put here???
</bindings>