Query:
db.getCollection('parents').insertMany(
[{
'name': 'Mark',
'children': 'No Childs'
},{
'name': 'Carl',
'children': '2'
}], {
'ordered': true,
}
)
I'm using mongoose as ORM
Can someone please suggest if we have any options like unique: true? I want the content to be checked not the _id since it will never be duplicate
Note: I've tried findOneAndUpdate using upsert: true, but here I've to insert multiple docs at the same time