Issue: bulkWrite() does not return a proper BulkWriteResult instance when all operations fail validation…
Issue: bulkWrite() does not return a proper BulkWriteResult instance when all operations fail validation…: a task in LegoFlow-SWE (Harbor dataset). When calling Model.bulkWrite(operations, { ordered: false }) and none of the operations pass Mongoose schema validation, the returned object is not an…
The task
When calling `Model.bulkWrite(operations, { ordered: false })` and none of the operations pass Mongoose schema validation, the returned object is not an instance of the MongoDB driver's `BulkWriteResult` class. This causes methods like `getWriteErrorAt(index)` and `getWriteErrorCount()` to be unavailable, even though…
Part of Lego-X/LegoFlow-SWE.