@NamedQueries(@NamedQuery(name = "query name",
query = "select o from RentLicense o where o.active = true and o.tenant = ?1"),
@NamedQuery(name = "another query name",
query = "select o from RentLicense o where o.expired = ?1"))public class RentLicense() {}
isn’t compiled with “Expecting an element”error, but
@NamedQueries(NamedQuery(name = "query name",
query = "select o from RentLicense o where o.active = true and o.tenant = ?1"),
NamedQuery(name = "another query name",
query = "select o from RentLicense o where o.expired = ?1"))
public class RentLicense() {}
is compiled fine.
The only one difference is ‘@’ prefix before NamedQuery annotation which should be mandatory, but I have to remove the prefix for errorless compilation
Alot has been changed in M13 especially iin the area of annotations which is discussed in this blogpost.
So I think it's wise to update to M13 (0.13.1513)
This is right: when you annotate something (a declaration or an expression), you prefix the annotation with `@`, but when you simple instantiate an annotation class as an argument to another annotation, you are not annotating anything any more, and `@` is not applicable. The error message could be better though