I need to insert documents on MongoDB (with specific id instead of auto generated ObjectID) using java..
To insert one document or update if exist, I tried
Try this @ebt_dev:
db.collection("collectionname").insertOne(data, { forceServerObjectId: false })