java - equivalent of like in mongodb spring -


I want to find something similar in the Mongodb spring

precise here

  query.addCriteria (criteria where (area) .is ("myfield"))  

I want something like this:

  query.addCriteria (Criteria) where (field). LIKE ("myfield"))  

Try to make regex, it happens in the same output in case of LIKE .

  Criteria.where (field) .regex ("myfield", "i");  

Note that i is case-insensitive.


Comments