Can I get the SQL string from a JPA Query object?

前端 未结 8 604
慢半拍i
慢半拍i 2021-01-01 12:36

May I know how can I get the sql from a JPA query? or let\'s say, convert the JPA query to a SQL string? Thank you very much!

8条回答
  •  渐次进展
    2021-01-01 13:03

    Beside enabling the logging like @Matt Handy mentioned it is also possible to get the SQL String for a specific query with eclipselink at runtime as described here.

提交回复
热议问题