Quantcast
Viewing latest article 22
Browse Latest Browse All 48

Answer by Vaibhav for How to query MongoDB with "like"?

If you are using Spring-Data Mongodb You can do this in this way:

String tagName = "m";
Query query = new Query();
query.limit(10);        
query.addCriteria(Criteria.where("tagName").regex(tagName));

Viewing latest article 22
Browse Latest Browse All 48

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>