All database queries whether SQL or HQL should be externalize to configuration files:
- Production queries (SQL or HQL) should be stored in hibernate mapping files
- Entity related queries should go in the associated entity mapping file
- Non entity related queries should go in mapping files unrelated to entities and grouped by function area
- Patch tasks SQL (no HQL allowed) queries should be stored in a property file
Labels