Hello JPA experts,
I have a question regarding named queries.
AFAIK they can only be placed onto entities via annotations. For people using code generators for their entities, this isn't an option. Working around it by using XML as described here http://jdevelopment.nl/put-named-queries-jpa/ is useful but suboptimal. Overall, putting named queries onto entities and falling back to XML in an annotation-only world is pretty clumsy IMHO.
Q: Aren't there any plans to improve the situation in the upcoming JPA spec?
I'd really like to put them into my service layer. I would really like to see some improvement here.
Can it be done?
Comments appreciated.
Karsten Wutzke