Mixing JPA annotations and XML configuration
Posted
by HDave
on Stack Overflow
See other posts from Stack Overflow
or by HDave
Published on 2010-05-15T04:12:12Z
Indexed on
2010/05/15
4:24 UTC
Read the original article
Hit count: 247
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?
© Stack Overflow or respective owner