-->
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.  [ 4 posts ] 
Author Message
 Post subject: How to get sql from hibernate criteria?
PostPosted: Tue Nov 06, 2007 3:10 pm 
Newbie

Joined: Thu Oct 04, 2007 10:32 am
Posts: 6
How can I get / generate the SQL or HQL from a hibernate criteria?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 18, 2008 3:51 pm 
Newbie

Joined: Sat Oct 18, 2008 3:45 pm
Posts: 1
Hi, can you please let me know how you solved this problem - i need to et the hql/sql from Hibernate criteria.
Thanks,


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 18, 2008 5:40 pm 
Expert
Expert

Joined: Mon Nov 26, 2007 2:29 pm
Posts: 443
Retrieving it from the code, at run time, I don't know.
How to capture it in a log, is explained here

http://hibernar.org/articulos_en/logging.php

_________________
Gonzalo Díaz


Top
 Profile  
 
 Post subject: What about runtime output?
PostPosted: Mon Oct 20, 2008 9:51 am 
Newbie

Joined: Mon Oct 20, 2008 9:22 am
Posts: 1
gonzao_diaz wrote:
Retrieving it from the code, at run time, I don't know.
How to capture it in a log, is explained here

http://hibernar.org/articulos_en/logging.php


I am looking for a way to retrieve SQL output at run time. Why? I have a service configurator app running on a development environment. After configuring the service (a C daemon with many configuration tables) and testing it, I want to port the exact changes to the database to production environment through an sql script, which would be offered to the user as a download. I checked your link and thought about tewaking the appender to log on a different file at each user interaction, but, unfortunately, this example won't bind the values to the sql output.


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