30. How would you see the Hibernate generated SQL statements on console


You can add properties direct to hibernate.cfg.xml like this :

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

For Eclipse users:

You can turn on hibernate.show_sql=true in MyEclipse config editor - open your hibernate.cf.xml, find tab 'Properties' click add, choose

show_sql and set value to true


1 comment:

  1. Amazing & Great informative blog,it gives very useful practical information to developer like me. Besides that Wisen has established as Best Hibernate Training in Chennai . or learn thru Online Training mode Hibernate Online Training | Java EE Online Training. Nowadays Hibernate ORM has tons of job opportunities on various vertical industry.

    ReplyDelete