Mongo query is not working for embedded documents
问题 I'm using Spring Data Mongo and simple mongo query to get the list of Active Status departments. When I used below query, it still pulling the InActive records too. db.getCollection('employee').find({"departments.status" : "A"}) Sample data - { "firstName" : "Sichita", "lastName" : "Vinchurkar", "email" : "svinchurkar@gmail.com", "departments" : [ { "deptName" : "IT Support", ....... ....... "status" : "A" }, { "deptName" : "Mobile Development", ....... ....... "status" : "I" }, { "deptName"