Timestamps Initialisation Error with InsertMany and Discriminators #12150
Labels
confirmed-bug
We've confirmed this is a bug in Mongoose and will fix it.
Milestone
Prerequisites
Mongoose version
6.4.6
Node.js version
16.15.1
MongoDB server version
5.0.9
Description
Nested schema with a
{timestamps: true}
inside a schema that is a Discriminator will fail to initialise timestamps withinsertMany()
while successfully inserting the same object withcreate()
.Removing
{timestamps: true}
from the nested schema seems to fix the problem.Steps to Reproduce
Error Stack Trace
Expected Behavior
No response
The text was updated successfully, but these errors were encountered: