We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
** case 1 await connection.collection("invoice").insert(invoice, {session});
await connection.collection("invoice").insert(invoice, {session});
**case 2 await invoice.save({ session}); invoice is a mongoose model
await invoice.save({ session});
Case 2 doesn't work when it runs 2 functions and each inserts multiple invoices
error msg : MongoError: Transaction 1 has been committed.
does it have anything wrong?
The text was updated successfully, but these errors were encountered:
I don't understand the issue, can you please expand your code samples and add a full stack trace?
Sorry, something went wrong.
No branches or pull requests
** case 1
await connection.collection("invoice").insert(invoice, {session});
**case 2
await invoice.save({ session});
invoice is a mongoose model
Case 2 doesn't work when it runs 2 functions and each inserts multiple invoices
error msg : MongoError: Transaction 1 has been committed.
does it have anything wrong?
The text was updated successfully, but these errors were encountered: