How to see the SQL generated by Hibernate

Hibernate generates SQL statements that let you access the database transparentely. You can set the show_sql property to true in the hibernate.cfg.xml configuration file to print the SQL statements to the console:


<property name="show_sql">true</property>