|SQL String from JPQL Query [message #685893]
||Mon, 20 June 2011 14:34
Registered: February 2011
I've a JPQLquery and I want to get the sql String..|
Now I'm doing in this way:
EJBQueryImpl qi = (EJBQueryImpl)jpqlQuery;
String sqlQueryString = qi.getDatabaseQuery().getSQLString();
The problem is that in the sqlQueryString the constant are replaced with ?
I've tried to get the values of the parameters navigating the expressions trees (getSelectionCriteria() and getHavingCriteria()) and I get it.. the problem is that in this way I lose the type (I can't get the difference between Strings or int..)
Do any one ever have a problem like this one?
[Updated on: Mon, 20 June 2011 15:11]
Report message to a moderator
Powered by FUDForum
. Page generated in 0.17725 seconds