I\'m switching to the MongoDB Java driver version 3. I cannot figure out how to perform an update of a Document. For example, I want to change the \"age\" of an user:
<
Use:
coll.updateOne(eq("name", "frank"), new Document("$set", new Document("age", 33)));
for updating the first Document found. For multiple updates:
coll.updateMany(eq("name", "frank"), new Document("$set", new Document("age", 33)));
On this link, you can fine a quick reference to MongoDB Java 3 Driver