solomax commented on code in PR #208:
URL: https://github.com/apache/openjpa/pull/208#discussion_r4220195515
##########
openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/kernel/exps/MatchesExpression.java:
##########
@@ -113,12 +113,22 @@ public void appendTo(Select sel, ExpContext ctx, ExpState
state,
// escape out characters by using the database's escape sequence
DBDictionary dict = ctx.store.getDBDictionary();
- if (_escape != null) {
+ // an empty escape character means the same as none at all; the
+ // JPQL grammar accepts ESCAPE '' and some databases reject it
+ if (_escape != null && !_escape.isEmpty()) {
Review Comment:
Maybe we have some helper for this? :)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]