I want to store my HQL queries externally to the application and retrieve them using the GetNamedQuery function. These queries are projection queries and don't relate directly to any individual entity, yet Hibernate seems to insist that you must store the query in one of the data entity mapping files instead of centrally in an arbitrary file just for storing queries for general use.
Is there a way I can store queries for general use externally, perhaps in a mapping file dedicated for this purpose, instead of having to store them in one of the individual data mapping files?
|