I port my applications to MongoDb 3.0.2. I have no problem with inserts, finding and deleting. But problems with updating. Especially with eq() .
In this sentence:
coll.updateOne(eq("_id", id), new Document("$set", new Document("name", name)));
The variable id defined by ObjectId . Eclipse gives me an error:
The eq (String, ObjectId) method is undefined for type SystemDAO (my java class).
What am I doing wrong? I followed the examples in the Mongo java driver docs.
source share