How can I see the query on my H2 database ?
1 answer
Hello Pierre-Yves,
Yes, this is possible.
- Run the H2 console from the studio via « Development / Business Data Model / Browse data »
- In the console, run this
SET TRACE_LEVEL_SYSTEM_OUT 3;
SET TRACE_LEVEL_FILE 3;
Execute your REST API
- Execute your REST API
Then in the H2 folder (located under /workspace//h2database) a new file is created: business_data.db.trace.db - Open the file
It will contain all the request
/*SQL l:275*/select directionl0_MyBDMObject_persistenceId as MyBDMObject1_1_0_, directionl0_.DIRECTION as DIRECTIO2_64_0_, directionl0_.LibelleAutres_ORDER as directio3_0_ from MyBDMObject directionl0_ where directionl0_.MyBDMObject_persistenceId=? {1: 17283};
Best,