Open mergingseas opened 2 years ago
Seems to me this is a problem with mongoose itself. Other people are experiencing also problems with additional options: https://stackoverflow.com/questions/63436981/mongoose-adding-subdocument-to-array-giving-error-id-this-ownerdocument-m
Would you try to install a newer mongoose version? If this fixes the problem, I can update it. However - I have become careful with updating mongoose as this can lead to problems - open new bugs that you did not know about ;-)
using timeslots:true doesn't seem to be an issue when using mongoose directy. I did upgrade to mongoose 6 which is the latest driver for the latest mongodb update to mongodb 5
thanks
this is my current workaround using mongoose-multi
timestamps: { currentTime: () => new Date() }
after creating a schema and then setting "timestamp: true" I get error when creating the document.