Mixing JPA annotations and XML configuration
- by HDave
I have a fairly large (new) project in which we have annotated many domain classes with JPA mappings. Now it is time to implement many named queries -- some entities may have as many as 15-20 named queries. I am thinking that writing these named queries in annotations will clutter the source files and therefore am considering putting these in XML mapping files.
Is this possible?
Mort importantly, is this reasonable?
Are there better approaches?
How is this done?