2022-06-15

MongoDB - How to insert an "ObjectId" value manually

 db.collection.insert({

    "_id": {

        "$oid": "32b8d4ebe3fa527c849345e7"

    },

    "field_2": "value_2"

});

No comments:

Post a Comment