spring-data-mongodb icon indicating copy to clipboard operation
spring-data-mongodb copied to clipboard

Add support for "inRegex" and "notInRegex" keyword in derived queries [DATAMONGO-1531]

Open spring-projects-issues opened this issue 9 years ago • 1 comments

Marc Tarin opened DATAMONGO-1531 and commented

Add support for IN_REGEX (and NOT_IN_REGEX) keywords to MongoQueryCreator.

As an alternative to the solutions I offered in the SO thread, it would be helpful to match a query parameter against a list of regular expressions with a findByFooRegexIn (and its counterpart findByFooRegexNotIn)


Reference URL: http://stackoverflow.com/questions/36600550/passing-array-of-reg-expressions-to-spring-based-mongo-query

spring-projects-issues avatar Nov 21 '16 11:11 spring-projects-issues

It seems passing a list of java.util.regex.Pattern to the $in operator creates and executes the query as expected.

martin-tarjanyi avatar Oct 25 '21 12:10 martin-tarjanyi