From 738ac857674572a48fddf7b921b73cd3bd2c1bd3 Mon Sep 17 00:00:00 2001 From: hopecee Date: Sat, 13 Jan 2018 15:24:28 +0100 Subject: [PATCH] Support for Filter method .contains() --- src/main/java/org/datanucleus/query/JDOQLQueryHelper.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/datanucleus/query/JDOQLQueryHelper.java b/src/main/java/org/datanucleus/query/JDOQLQueryHelper.java index 265d0b6de..d90b7695f 100644 --- a/src/main/java/org/datanucleus/query/JDOQLQueryHelper.java +++ b/src/main/java/org/datanucleus/query/JDOQLQueryHelper.java @@ -226,6 +226,10 @@ else if (dyExpr.getOperator() == Expression.OP_DISTINCT) { // Processed above } + else if (dyExpr.getOperator() == Expression.OP_CONTAINS) + { + str.append(" =~ "); + } else { // TODO Support other operators @@ -314,4 +318,4 @@ else if (value instanceof Boolean) throw new UnsupportedOperationException("Dont currently support " + expr.getClass().getName() + " in JDOQLHelper"); } } -} \ No newline at end of file +}