-->
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.  [ 2 posts ] 
Author Message
 Post subject: SQL logging in hibernate
PostPosted: Wed Nov 07, 2007 7:27 am 
Senior
Senior

Joined: Mon Jul 24, 2006 8:43 am
Posts: 160
Hi,
I know Hibernate supports logging, detailed in the F.A.Q.
http://www.hibernate.org/119.html#A17

and the Manning book.

However, this logs the prepared statements with the ?, ?, ? I need to be 100% sure of what values are being passed up.

No I could turn on additional logging in my JPA entity POJOs but I need to absolutely sure.

Is there any plans for hibernate to include this feature as user friendly as possible.

Is it possible to know what hibernate's plans are for logging?

Many many thanks


Top
 Profile  
 
 Post subject: SQL logging
PostPosted: Fri Nov 09, 2007 11:14 am 
Newbie

Joined: Fri Nov 09, 2007 10:06 am
Posts: 2
In your logging config in addition to having org.hibernate.sql set to debug level to display SQL statements do the same for org.hibernate.type and the values of the bind variables will be displayed.

Here is an example from one of our logs:

Code:
    where
        beverages0_.person_id=?
DEBUG - 15:13:10,862 - [IntegerType][main]: binding '1' to parameter: 1


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.