I am using MongoDB 3.2 with Java. I read the documentation and it says to use org.bson.BsonDocument since other options like BSONObject and Document are deprecated. Now, I have query similar to:
db.schools.find({ zipcode: "63109" },
{ students: { $elemMatch: { school: 102 } } } )
I am wondering: how can I write this query in Java?
Note: Here we have two documents inside the find function, while it accepts only single Bson Document or multiple Bson Element(s).
Any help would be appreciated.