-->
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: Actual SQL generation - Debugging information
PostPosted: Wed Oct 12, 2005 4:56 pm 
Newbie

Joined: Wed Oct 12, 2005 4:39 pm
Posts: 15
Location: India
Hi everyone,

Does anyone know how to find the exact Sql query (with the data) that Hibernate fires to the Database.

For example.. by turning on the show_sql to true .. i can get information like the following:
Hibernate: insert into studentaddress (EnquiryId, AddressType, street1, street2, city, state, pincode) values (?, ?, ?, ?, ?, ?, ?).

But then what is being passed as "values" to these question marks seems to be a mystery. Debugging is becoming nightmarish if I dont know the exact values being passed.

The exceptions that Hibernate is throwing arent helpful either. It just throws a ConstraintViolationException... I have no clue how to find which constraint on which field has been violated from the exception.


Can someone help me please?

Thanks much.
Raghu


Top
 Profile  
 
 Post subject: tools tools tools
PostPosted: Wed Oct 12, 2005 5:09 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
http://www.p6spy.com/ might be helpful

or you might be able to increase verbosity level of the database server log, in case of
Postges it will be -d parameter, -d 2 usually prints out enough information

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

SourceLabs - dependable OpenSource systems


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 12, 2005 5:13 pm 
Expert
Expert

Joined: Wed Apr 06, 2005 5:03 pm
Posts: 273
Location: Salt Lake City, Utah, USA
See http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#configuration-logging

(org.hibernate.type logging will show parameters)

_________________
nathan


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.