-->
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: Viewing sql with parameters
PostPosted: Wed Apr 30, 2008 5:04 am 
Newbie

Joined: Wed Apr 30, 2008 4:23 am
Posts: 4
Hi

I'm a newbie to hibernate. I like to view the sql queries generated by hibernate. Currently i have set the following properties in the hibernate.cfg.xml file.
    <property name="show_sql">true</property>


But i like to view the parameters passed as well. The current method only shows the query like
Code:
............................
where
    roomtypeli0_.HotelId=?
    and roomtypeli0_.BoardTypeId=?


I would like to view values instead of '?'. Is there a way of setting a property in the hibernate.cfg.xml file so that i can view sql queries with parameters. I'm also using slf4j as the loggger so not using a seperate property file. Please help.

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 30, 2008 5:23 am 
Regular
Regular

Joined: Mon Aug 06, 2007 10:49 am
Posts: 67
Location: Banska Bystrica, Slovakia
for org.hibernate.type set log level to debug


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.