I have a Play app that uses a database, and for debugging purposes I want to show the SQL that JPA uses. How can I do this?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- SQL join to get the cartesian product of 2 columns
- sql execution latency when assign to a variable
- How to maintain order of key-value in DataFrame sa
In
application.conf
, you can turn showing SQL on uncommentingjpa.debugSQL=true
. This will give you the prepared statement queries with question marks in them. Also, Play uses Hibernate, so you can also use Hibernate properties. These can be written inapplication.conf
directly or in a separatehibernate.properties
file residing in theconf
folder of your Play application.maybe this could also help
http://www.mkyong.com/hibernate/how-to-display-hibernate-sql-parameter-values-log4j/
it allows you so also see the sql binding parameters values...