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
session
6.9.x
16.x
Any
No response
'use strict'; const mongoose = require('mongoose'); mongoose.set('debug', true); run().catch(err => console.log(err)); async function run() { await mongoose.connect('mongodb://localhost:27017/test'); const schema = new mongoose.Schema({ name: String }); const Test = mongoose.model('Test', schema); // Mongoose: tests.insertOne({ name: 'foo', _id: new ObjectId("63f28c9760c00f9e5b3d6001"), __v: 0 }, { session: null }) await Test.create({ name: 'foo' }); }
Sending a null session is unnecessary and confusing. session shouldn't show up in debug output if you're not using sessions.
null
See description
The text was updated successfully, but these errors were encountered:
Merge pull request #13053 from lpizzinidev/gh-13052
23aa1a7
fix(model): avoid sending null session option with document operations
test: make #13052 test consistent with others
c45f67d
test: make #13052 test more explicit with debug usage
978b49d
Merge pull request #13141 from lpizzinidev/gh-13052-test-refactor
da7de2f
test(query): refactored test case for empty session property
test: fix test for #13052 from 6.x merge
03a2a4e
fix: test gh-13052
621d825
Successfully merging a pull request may close this issue.
Prerequisites
Mongoose version
6.9.x
Node.js version
16.x
MongoDB server version
Any
Typescript version (if applicable)
No response
Description
Sending a
null
session is unnecessary and confusing.session
shouldn't show up in debug output if you're not using sessions.Steps to Reproduce
See description
Expected Behavior
No response
The text was updated successfully, but these errors were encountered: