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
mongoose.startSession().then(async (session) => { session.startTransaction(); try { let opts = {session, validateBeforeSave: true}; let user = await new User(req.body).save(opts); let wallet = await new Wallet({user: user.id}).save(opts); await session.commitTransaction(); res.send({success: true, data: user}); } catch (e) { await session.abortTransaction(); return next(e); } })
Current debug output miss session.id to command query find exist validate
Mongoose: users.find({ _id: { '$in': [ 'bdd7a1f9-b57b-45e3-ab85-9b9a7a956ec1' ] } }, { fields: { _id: 1 } }) wallet validation failed: user: user with id bdd7a1f9-b57b-45e3-ab85-9b9a7a956ec1 does not exists
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Current debug output miss session.id to command query find exist validate
The text was updated successfully, but these errors were encountered: