-->
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 from Criteria
PostPosted: Tue Feb 09, 2010 7:02 am 
Newbie

Joined: Tue Jan 19, 2010 4:37 am
Posts: 2
Is there any possibility to get sql query from criteria or even from generated HQL?


Top
 Profile  
 
 Post subject: Re: sql from Criteria
PostPosted: Wed Feb 10, 2010 8:27 am 
Expert
Expert

Joined: Tue Jun 16, 2009 3:36 am
Posts: 990
You can get it logged either by:
-activating log4j.logger.org.hibernate.SQL=TRACE
-defining hibernate.show_sql=true in your configuration file.
-using P6spy (provides the best logging with parameter binding)

If you indeed want the sql-query have returned as String in the application, I also don't know how to do.


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.