Closed
Description
Both are mongoose schemas.
task.save(Product,product.product) .save(ProductFinals,_.assign(product.productFinal, {product_id : { $ojFuture : "0._id"}}))
The data in the first command is fine.
Data for the second save command has a validation error (intentional).
` task.run({useMongoose : true})
.then(() => {
res.sendStatus(200)
})
.catch((err) => {
console.log(JSON.stringify(err))
})`
Expeceted behavior : Everything is rolled back
Observed Behavior : Goes to the error block of the run command, but the first save is committed to the db.