Hello
have you tried using the opensource tool P6Spy
http://www.p6spy.com/ ?
basically it is a sort of wrapper around your DB driver that logs every JDBC call, so you can not only read the query that's sent to your db , but also page through the result sets with actual replacement values.
The way I use it:
add the spy.jar to your classpath; then in your hibernate.properties, replace
hibernate.connection.driver_class org.postgresql.Driver
with
hibernate.connection.driver_class com.p6spy.engine.spy.P6SpyDriver
enter all JDBC connection details (driver, url, login, password etc...) in the spy.properties file provided by the tool.
et voila!
hope this helps,
Isabelle
aaime wrote:
Hi,
I was wondering if there is any work underway to make Hibernate generate human readable sql, that is, sql without all of those unecessary and weird names aliases for both fields and table names.
I understand having a unique way of addressing them is necessary to make the or-mapper work, but the current solution (at least with Hibernate 2.1.8, don't know about HIbernate 3) generated unecessary aliases that make the generated query harder to read...