1

How to insert new document in a MongoDB collection if there's no other document with specified unique field exists, or update the existing one otherwise?

Is there anything more reasonable than just using findOne and save methods with some conditions?

Community
  • 1
  • 1
FrozenHeart
  • 19,844
  • 33
  • 126
  • 242

0 Answers0