-->
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: Can Hibernate display values it is going to inser/update
PostPosted: Fri Jan 20, 2006 4:52 am 
Newbie

Joined: Mon Dec 12, 2005 10:45 am
Posts: 12
Hello,

"show_sql" and "format_sql" tell Hibernate to display the SQL statement but values are not displayed, they are proxied with a '?' character.

Is there an switch to tell Hibernate to also display the values it is going to insert/update ?


Pascal Jacob.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 20, 2006 5:11 am 
Expert
Expert

Joined: Thu May 26, 2005 9:19 am
Posts: 262
Location: Oak Creek, WI
Hi,

I think you have an answer in this thread: http://forum.hibernate.org/viewtopic.ph ... highlight=

_________________
RamnathN
Senior Software Engineer
http://www.linkedin.com/in/ramnathn
Don't forget to rate.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 20, 2006 5:51 am 
Newbie

Joined: Mon Dec 12, 2005 10:45 am
Posts: 12
Thank you Ramnat.

I investigate a bit more and I also found that in my log4j.properties (I did copy that in the file at the time I start the project then completely forget about it !!)

I hope this will help other people.

Code:
### Log levels for Hibernate

log4j.logger.org.hibernate = info
#log4j.logger.org.hibernate = debug

### log HQL query parser activity
#log4j.logger.org.hibernate.hql.ast.AST = debug

### log just the SQL
## it respects the "format_sql" and "use_sql_comments" settings from hibernate.cfg.xml
log4j.logger.org.hibernate.SQL = info

### log JDBC bind parameters
log4j.logger.org.hibernate.type = debug

### log schema export/update
log4j.logger.org.hibernate.tool.hbm2ddl = info

### log HQL parse trees
#log4j.logger.org.hibernate.hql = debug

### log cache activity
#log4j.logger.org.hibernate.cache = debug

### log transaction activity
#log4j.logger.org.hibernate.transaction = debug

### log JDBC resource acquisition
#log4j.logger.org.hibernate.jdbc = debug

### enable the following line if you want to track down connection
### leakages when using DriverManagerConnectionProvider
#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider = trace


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.