OPENJPA-1295: fix the escape character

git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@814166 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Fay Wang 2009-09-12 14:58:07 +00:00
parent d7b4296c8f
commit 558446dfe9
1 changed files with 6 additions and 4 deletions

View File

@ -105,10 +105,12 @@ class MatchesExpression
// escape out characters by using the database's escape sequence
DBDictionary dict = ctx.store.getDBDictionary();
if (_escape != null && _escape.equals("\\")) {
buf.append(" ESCAPE '").append(dict.searchStringEscape).append("'");
} else
buf.append(" ESCAPE '").append(_escape).append("'");
if (_escape != null) {
if (_escape.equals("\\"))
buf.append(" ESCAPE '").append(dict.searchStringEscape).append("'");
else
buf.append(" ESCAPE '").append(_escape).append("'");
}
}
sel.append(buf, state.joins);