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.
To keep such question marks in a SQL statement from being interpreted as positional parameters, use two question marks ( ?? ) as escape sequence. You can also use this escape sequence in a Statement , but that is not required. Specifically only in a Statement a single ( ? ) can be used as an operator.
You can use native SQL to express database queries if you want to utilize database-specific features such as query hints or the CONNECT keyword in Oracle. Hibernate 3. x allows you to specify handwritten SQL, including stored procedures, for all create, update, delete, and load operations.
show_sql to true tells hibernate to Write all SQL statements to console. This is an alternative to setting the log category org.
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.
(As mentioned in/see also this answer).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With