Tutorial by Examples

In the logging configuration file of your choice set the logging of the following packages to the levels shown.: # log the sql statement org.hibernate.SQL=DEBUG # log the parameters org.hibernate.type=TRACE There will probably be some logger specific prefixes that are required. Log4j config:...
This will show you the generated SQL, but will not show you the values contained within the queries. <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> <property name="hibernateProperties"> <p...
Some applications that use Hibernate generate a huge amount of SQL when the application is started. Sometimes it's better to enable/disable the SQL log in specific points when debugging. To enable, just run this code in your IDE when you are debugging the aplication: org.apache.log4j.Logger.getLog...

Page 1 of 1