Skip to content

Commit 557ab2b

Browse files
committed
fix: include LocalDate, LocalDateTime in params that need conversion+escaping
1 parent 6fd7c59 commit 557ab2b

File tree

1 file changed

+1
-1
lines changed
  • redis-om-spring/src/main/java/com/redis/om/spring/repository/query/clause

1 file changed

+1
-1
lines changed

redis-om-spring/src/main/java/com/redis/om/spring/repository/query/clause/QueryClause.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ public String prepareQuery(String field, Object... params) {
246246
} else {
247247
if (clauseTemplate.getIndexType() == FieldType.TEXT) {
248248
prepared = prepared.replace(PARAM_PREFIX + i++, param.toString());
249-
} else if (clauseTemplate.getIndexType() == FieldType.NUMERIC) {
249+
} else if (clauseTemplate.getIndexType() == FieldType.NUMERIC && !paramClass.equalsIgnoreCase("java.time.LocalDateTime") && !paramClass.equalsIgnoreCase("java.time.LocalDate")) {
250250
prepared = prepared.replace(PARAM_PREFIX + i++, param.toString());
251251
} else {
252252
prepared = prepared.replace(PARAM_PREFIX + i++,

0 commit comments

Comments
 (0)