There's a method Model#create in a Mongoose to which I can send an array of objects.
var items = [{id: 1},{id: 2},{id: 3},{id: 4}];
Model.create(array, function (err, succededItems) {
...
});
Everything works fine except behavior when some of the objects which I try to create failed to be saved. In this scenario in err object I get, there're details about first object which has been failed, and in succededItems I get an array of the objects which have been saved.
I doubt is it possible to get in err or other way, an array which objects failed to save and reason, why did this happen?
Thank you in advance.