mongolite
mongolite copied to clipboard
Need for insertOne() command in order to get the _id that was generated
There is a need to get the insertId field with the _id value of the just inserted document, which is already available in db.collection.insertOne() from the mongoDB.
There are database use cases that you need to retrieve the _id that was automatically generated, to use it right away after inserting. Is there any option available in mongolite? Is it possible to implement as insertOne?
Thank you in advance!