Bhavani Polimetla's Notes

MongoDB – Create Documents

if _id is not provided, MongoDB inserts unique key.
if MongoDB founds duplicate values, it stops inserting other records. It follows insertions in the same order.
To prevent stopping at first error, we need to add attribute { “ordered”: false } to continue with others.
in batch inserts, if all are a success, it returns a list of ids.
in the case of errors, it shows success records counts and list of errors.