• Post Reply Bookmark Topic Watch Topic
  • New Topic

Location for storing NamedQuery

Mike Cheung
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, has anyone attempted to place namedqueries in XML files external to the entity classes' code? Just looking at http://jdevelopment.nl/put-named-queries-jpa/ and it appears we can place them within individual XML files, and reference them from the persistence.xml file.



Digging this a bit further it appears that this <mapping-file></mapping-file> is originally used for defining ORM mappings.

Has anyone tried defining the NamedQueries via this method and can comment on pros and cons?
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!