Answer the question
In order to leave comments, you need to log in
How to tell Hibernate to show what it substitutes instead of '?'
Hello!
Purely for debugging purposes, you need to see what kind of requests does the hibernate make?
I already have such properties:
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<property name="use_sql_comments">true</property>
But I have the following conclusion:
update
table1
set
field1=?,
field2=?,
field3=?,
fk_table1_id=?,
fk_table2_id=?
Here, in fact, I would like to see what is behind the signs "?".
I will be very grateful!
Answer the question
In order to leave comments, you need to log in
Enable debug logs, then it will be shown as binding 'value' to parameter: 1
.
PS In general, it is much better to use not question marks, but named parameters ( update table1 set field1=:field1, field2=:field2 ...
). It may seem redundant at first, but it's harder to shoot in the leg and can be reused.
You need to set up logging by including org.hibernate.type at the trace level. For log4j this is done like this: log4j.logger.org.hibernate.type=trace
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question