Is there a way to view the underlying SQL generated by a javax.persistence.Query object?
In other words, I have the following EJB QL query:
SELECT f FROM FunkyObject f where f.id = 4
I would like to see something like this:
SELECT funky_object.id, funky_object.name, funky_object.some_int_col
FROM funky_object
WHERE funky_object.id = ?
I see something like this in my log file when there's an error executing a query.
I would like to know how I can see the same info for a valid query.
I'm using EJB with TopLink on Sun Application Server (JEE5).
Thanks in advance...