-->
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: show real sql
PostPosted: Thu Jan 12, 2006 3:27 am 
Beginner
Beginner

Joined: Mon Mar 07, 2005 12:02 pm
Posts: 39
Hi there, I just wanted to know if there is a way to print out the exact query in hibernate3. If I showsql=true then I get a query that looks like this:

select * from dog where name = ?

I want to be able to see what it uses instead of the '?'. Im using mysql.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 12, 2006 4:04 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: Thu Jan 12, 2006 5:55 am 
Senior
Senior

Joined: Tue Aug 23, 2005 8:52 am
Posts: 181
since all of the sqls are prepared statements, thats what youd see when you say show_sql = true. If you really wanted to see the objects bound to it, turn on the DEBUG logging and trace through the logs to find out what it binds to.


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.