Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » SQL String from JPQL Query (How to get a complete SQL String from JPQL Query)
SQL String from JPQL Query [message #685893] Mon, 20 June 2011 10:34 Go to previous message
Alberto  is currently offline Alberto
Messages: 7
Registered: February 2011
Junior Member
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 11:11]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic:@UnionPartitioning does not seem to be using the correct connection pool
Next Topic:(no subject)
Goto Forum:
  


Current Time: Sat May 18 09:37:13 EDT 2013

Powered by FUDForum. Page generated in 0.01726 seconds