-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Milestone
Description
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Mongoose version
6.9.x
Node.js version
16.x
MongoDB server version
Any
Typescript version (if applicable)
No response
Description
'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.
Steps to Reproduce
See description
Expected Behavior
No response
Metadata
Metadata
Assignees
Labels
No labels