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!
For Eclipselink: you can extract the SQL the following way:
query.unwrap(EJBQueryImpl.class).getDatabaseQuery().getSQLString()
It works only after the query has been executed.