How can I see the parameters Hibernate is binding in the queries?

Solution Verified - Updated -

Issue

In hibernate we can set this property:

     <property name="hibernate.show_sql" value="true"/>

in persistence.xml to see the sql's log but the logs does not show the parameters that was sent to the sql but shows '?' instead. Is it possible to see the parameters values?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 4.x
    • 5.x
  • Hibernate

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.