If you use Hibernate then you will have probably wanted at some point to see the underlying SQL that was being run. One solution is to enable SQL logging by increasing the Log4J logging levels of the
There are two issues with this technique though:
How to Print Out Bind Variables in Java Prepared Statements
I've not tried it yet, but the next time I need to see the bind variable values I certainly will be!
Technorati Tags: Spring, Hibernate, Java, Prepared Statement, Bind Variable, Andy Kayley, Andrew Beacock
org.hibernate packages.There are two issues with this technique though:
- At
DEBUGlevel you see the SQL but all bind variables are displayed as a? - At
TRACElevel you get everything and the kitchen sink, SQL, bind variables, results, etc. - it's very verbose!
How to Print Out Bind Variables in Java Prepared Statements
I've not tried it yet, but the next time I need to see the bind variable values I certainly will be!
Technorati Tags: Spring, Hibernate, Java, Prepared Statement, Bind Variable, Andy Kayley, Andrew Beacock
Comments