users@jpa-spec.java.net

[jpa-spec users] Annotating NamedQueries

From: <maarten_l_at_yahoo.com>
Date: Thu, 21 Jun 2012 13:23:54 +0000 (GMT)

From the spec:

"The NamedQuery and NamedQueries annotations can be applied to an
entity or mapped superclass."

Why was that limitation chosen? Why not on any class you like?

Is there a workaround available to put annotations on POJOs? For
example on a "Service" Java POJO which contains logic/queries that
stretch across several Entities?

Regards,