gavin wrote:
You can just enable debug-level locgging for
net.sf.hibernate.type
Tried this, debug gives a lot more information than I would want to see.
What would be very useful (at an info or debug level), is to see
the query followed by the values of all bind parameters, e.g.
SELECT * from EMP where LST_NAME = ?
[Parameter 1] SMITH
I'm evaluating Hibernate to replace a framework that we built in-house.
Ours is not an O/R mapping, it's more of an API that sits above JDBC.
One of its features is that it lets us log the values of bind parameters
as in the example above.
Alternatively (depending on a configuration setting), the values can be automatically substituted in place of the ? marks. So the above query
would get logged as:
SELECT * from EMP where LST_NAME = 'SMITH'
The latter is more expensive to do, however we've found it to be
invaluble during debugging and troubleshooting since we can simply
copy the SQL and run it directly against the DB to see what's going on.
Helps a great deal for large queries with many parameters.