0

I need to check the query created by the hibernate and the parameters passed in the query by hibernate. I am using application.yml file for configuration and logback.xml for logging.

I have added

<logger name="org.hibernate.type.descriptor.sql" level="TRACE"/> 

property in the logback.xml and

  jpa:
    show-sql: true

in application.yml file.

the property show-sql :true works fine and I am able to see the query generated by JPA

Hibernate: 
    delete 
    from
        ply_blackhole_entity_mapping 
    where
        detail_id=?
Hibernate: 
    delete 
    from
        ply_vms_provider_blackhole_restriction 
    where
        id=?
Hibernate: 
    delete 
    from
        ply_blackhole_detail 
    where
        id=?

but I am not able to see the parameters passed to it.

David Lee
  • 665
  • 7
  • 20
Shubham Parmar
  • 147
  • 1
  • 13
  • Are you not seeing `o.h.type.descriptor.sql.BasicBinder : binding parameter` , just after the query line? – Kavithakaran Kanapathippillai Jul 20 '20 at 12:44
  • Does this answer your question? [How to print a query string with parameter values when using Hibernate](https://stackoverflow.com/questions/1710476/how-to-print-a-query-string-with-parameter-values-when-using-hibernate) – Jens Schauder Jul 21 '20 at 08:01

0 Answers0