Hi,
I am using a simple SQLTemplate select query but it fails because
of special charachters :
SELECT * FROM SDEPTHR INNER JOIN THRESH ON
SDEPTHR.DEPTHRID=THRESH.THRESHID WHERE SDEPTHR.JOBNAME = 'Test_*@\#*'
Error returned :
[v.3.0.1 Aug 25 2010 19:58:47] Error parsing template 'SELECT * FROM
SDEPTHR INNER JOIN THRESH ON SDEPTHR.DEPTHRID=THRESH.THRESHID WHERE
SDEPTHR.JOBNAME = 'Test_*@\#*'' : Lexical error:
org.apache.velocity.runtime.parser.TokenMgrError: Lexical error at line
1, column 115. Encountered: <EOF> after : ""
It looks like the '#*' is the problem but I can't find a way to properly
escape those characters
<http://velocity.apache.org/engine/releases/velocity-1.5/user-guide.html#stringliterals>.
I know using the SQLTemplate parameters would solve this problem but I
can't do that.
Is there a way to tell cayenne to not parse the query with velocity or
to escape properly the query ?
Thank you.
Laurent.
- SQLTemplate Velocity lexical error Laurent Marchal
-