These are chat archives for Automattic/mongoose

1st
Jun 2017
Stanislav Bilanenko
@stanislav-bilanenko
Jun 01 2017 09:44

Hello! Anyone faced the problem with versioning?
I’m doing:

doc = Model.findById()
... actions
    samedoc = Model.findById()
    samedoc.increment()
    samedoc.save()
doc.save()

And not getting any errors
Schema settings are default
Mongoose version is 4.10.4

Application console log of versions - before save and after save for doc - outer and samedoc - inner

inner before: 15
inner after: 16
outer before: 15
outer after: 15