|
It is awkward to store querie in Entity, but use it in DAO layer. We can add property (to do minimal impact on working code) to persistence.xml to scan for NamedQueries not only in Entities, but anywhere in classpath.
Currently as workaround we have to add @MappedSuperclass annotation to DAO classes.
|