I am trying to create the model for my mongodb database using mongoose. This is what I am trying to do:
var Class = mongoose.model(\'Class\', {className: St
I got a similar issue using mongoose 5.7.0+ using double nested schema.
Except it wasn't related to the keyword type but a mongoose validation bug.
type
https://github.com/Automattic/mongoose/issues/8472
Temporary workaround: Use Schema.Types.Mixed for the subschema
Schema.Types.Mixed