I\'m trying to query a collection using operands AND\'d together. I\'ve got the shell version working:
db.widgets.find({color: \'black, shape: \'round\', wei
I think the solution above should also work just fine, given the situation I'd suggest the following as an alternative. This is using Criteria
Query query = new Query();
List criteriaList = new ArrayList<>();
Criteria criteriaCreatedBy1 = new Criteria().where("title").is("input");
criteriaList.add(criteriaCreatedBy1);
Criteria criteriaCreatedBy2 = new Criteria().where("name").is("name input");
criteriaList.add(criteriaCreatedBy2);
query.addCriteria(new Criteria().andOperator(criteriaList.toArray(new Criteria[criteriaList.size()])));
List getSearchScreens = mongoTemplate.find(query,Screen.class,"collectionName");