Again, posting and answering a question for the benefit of others based on a problem I had the other day. Hopefully this saves someone a bit of time. I was a little surprised this wasn't built into JPA's EntityManager
.
How can I determine if an Entity has a NamedQuery
annotation with a specific name?
I need to determine if an Entity has a particular @NamedQuery
before I try executing it.