-->
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: Hibernate Event and underlying sql statement
PostPosted: Mon Nov 06, 2006 12:47 pm 
Newbie

Joined: Mon Nov 06, 2006 12:39 pm
Posts: 5
Basically, i need to find out whether there is real database sql statement executed when i do a save/update.

I tried to use pre-update event listener, but this interface is called upon session.update(), even no real sql statement is issued to the database.

So the question is, in hibernate how to find out whether there are sql statments are send over jdbc to the database.


Top
 Profile  
 
 Post subject: Re: Hibernate Event and underlying sql statement
PostPosted: Mon Nov 06, 2006 1:12 pm 
Newbie

Joined: Thu Jun 09, 2005 11:28 am
Posts: 6
Location: Karlsruhe, Germany
af6140 wrote:
So the question is, in hibernate how to find out whether there are sql statments are send over jdbc to the database.


If you need to know only for debugging purposes you can use http://www.p6spy.com/ which helps a lot understanding what
database actions hibernate causes.

_________________
Don't forget to rate!


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 06, 2006 1:23 pm 
Newbie

Joined: Mon Nov 06, 2006 12:39 pm
Posts: 5
No, this is not only for debuggin purpose, actually i knew there was no update statement sent to database(turned on hibernate.show_sql), but the hibernate event related to update was still fired.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 06, 2006 2:46 pm 
Newbie

Joined: Mon Nov 06, 2006 12:39 pm
Posts: 5
ok, PostEventListener serves this purpose.


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.