-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Is there any way..?
PostPosted: Tue Apr 13, 2004 9:52 am 
Newbie

Joined: Tue Apr 13, 2004 9:47 am
Posts: 1
Hello,
I have just started to use Hibernate in my project. My question is : Is there any way by which I can print all the SQL queries that Hibernate generates automatically..like insert for save() everytime Hibernate is executing a query in a database.
For example,suppose we do a simple insert using Hibernate to a table Dummy in a database,it should print the corresponding SQL string that was generated to insert the row into table Dummy.
Any inputs pls?

Thanks in advance!!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 13, 2004 10:50 am 
Beginner
Beginner

Joined: Tue Mar 16, 2004 5:15 am
Posts: 33
Try this property:

log4j.logger.net.sf.hibernate.SQL=debug


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 13, 2004 6:19 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
Read the documentation, Hibernate configuration: show_sql to true.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.