17

How do I see the actual value in query instead of questions marks? Now, I am seeing

Hibernate: inser into TABEL (ID, FORMAT, SIZE) values (?,?,?)

I want to see the real values being used instead of the question marks.

I set this in my hibernate config file and turned on the debug flag.

<property name="show_sql"> true </property>

Thank you in advance.

1
  • Why did you misspell inser(t)? Commented Jul 24, 2019 at 12:23

2 Answers 2

14

Hibernate uses prepared statements so you can't see the full SQL. You can set the log level for org.hibernate.type to trace to see the values bound to the parameters.

Reference

(As mentioned in/see also this answer).

Sign up to request clarification or add additional context in comments.

2 Comments

Can you please include a reference for this?
@Jolley71717 Sure, I added some.
-1

Use Log4j or Logback to enable and set javax.sql to DEBUG:

<logger name="java.sql" level="debug">
    <appender-ref ref="STDOUT" /> <!-- or your own appender -->
</logger>

1 Comment

This is not a solution for Hibernate. Spring Actuator shows no loggers with the names javax.sql or java.sql.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.