-->
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: How do i Debug (step through) Hibernate code?
PostPosted: Wed Nov 09, 2005 3:26 pm 
Newbie

Joined: Fri Nov 04, 2005 3:04 pm
Posts: 15
I have setup the source code in my IRAD(eclipse) workspace, trying to debug and step though.
When i stepinto the code

Code:
Serializable serObj = session.save(wsVO);


i endup on the
Code:
SessionImpl.afterTransactionCompletion
mehtod.

Any idea which class i have to put my breakpoint in order to check the generated SQL,
I am having problem with Chlid table insert, hibernate is always generating Update when i am expecting Insert.

Thanks.


Top
 Profile  
 
 Post subject: seeing sql
PostPosted: Wed Nov 09, 2005 4:18 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
Never had problems in IntelliJ-IDEA with debugging H code therefore could not comment on Eclipse.
But you do not need debugger to see SQL,
Simply specify <property name="hibernate.show_sql">true</property> in the session configuration, and it that is not enough and you want to see app the parameter bindings, then add log4j.logger.org.hibernate.type=DEBUG in your log4j configuration.

As fo Update when you need save: you may need to specify unsaved-value in the mapping file which is usually null, in this case H generates insert when key is null, and update when key is something.

http://www.hibernate.org/hib_docs/v3/re ... aration-id

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


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.