If you want to see the hibernate generated sql statements on console, what should we do?
Answer / Munazir Hussain
To see the Hibernate generated SQL statements on the console, you can enable logging by setting the appropriate log level in your configuration file or programmatically. For example, you can use the following code to enable SQL logging: LogFactory.getFactory().setAttribute("org.hibernate.SQL", Level.DEBUG);
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between jdbc and hibernate?
How do you implement one to one relationship in hibernate with xml mapping?
What is the purpose of mapping?
What is hibernate mapping file?
What is meaning of cascade in hibernate?
How to retrieve data from database using hibernate criteria?
What is use of hibernate session merge() call?
What is the difference between hibernate save () saveorupdate () and persist () methods?
What is unidirectional and bidirectional?
Mention some of the advantages of using orm over jdbc.
What are persistent objects hibernate?
What is flush in hibernate?