How can I see the SQL that is actually being run/executed when I'm using Hibernate?

By Alvin J. Alexander, devdaily.com

Using Hibernate, just configure this parameter in your hibernate.properties file:

hibernate.show_sql=true

This configuration parameter will cause Hibernate to show the actual SQL that is being generated/used when your queries are run. Of course it can be a little verbose, but hopefully it will also give you all the SQL you need to troubleshoot your problem.


devdaily logo