Hibernate HQL to SQL Translation

For debugging purposes using hibernate it’s often usefull to have the generated SQL query to an appropriate HQL query.
But setting the hibernate configuration hibernate.show_sql to true leads to logging any query made within an application (which can be a lot in some applications). With the following class the hibernate API is used to generate the correct SQL query from a given HQL query and can be used anywhere to log the generated query.
“Hibernate HQL to SQL Translation” Weiter lesen