1

I've a question on db: { safe: true } - which is being passed as an option to mongoose.connect in my nodeJS and MongoDB project.

I have the impression that this option is obsolete. Is that the case ? If yes, what was it replaced by? If not, where can I find the details of this option?

Knowing that I spent the afternoon looking for this information.

Many thanks in advance to you!

JP Silvashy
  • 46,977
  • 48
  • 149
  • 227
Thomtomdup
  • 33
  • 6

1 Answers1

1

This behavior, "SafeMode" appears to be obsolete. This is the equivalent of WriteConcern.Acknowledged, which is the default now.

You can manage this behavior on a transaction basis now, read more about WriteConcern here: https://docs.mongodb.com/manual/reference/write-concern/

JP Silvashy
  • 46,977
  • 48
  • 149
  • 227