spring-data-mongodb
spring-data-mongodb copied to clipboard
Add support for "inRegex" and "notInRegex" keyword in derived queries [DATAMONGO-1531]
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
It seems passing a list of java.util.regex.Pattern to the $in operator creates and executes the query as expected.