This content has been marked as final. Show 4 replies
The following is what you need to do to get the actual SQL that TopLink will send (regardless of query type, binding or no binding), and then modify it:
SQLCall call = request.getCall();
String sql = call.getSQLString();
call.setSQLString(sql + " " + HINT);
The vectorOfQueryArgs is the collection of arguments needed to execute the query - this can be an empty Vector if the query doesn't take any. Since the query has been prepared already, SQL string changes can be set on the SQLCall itself to save TopLink having to create a new SQLCall object and parse the string.