79487157

Date: 2025-03-05 16:55:24
Score: 1
Natty:
Report link

After spending several hours trying to solve this myself, the current answer (as of 2025) is to use findOneAndReplace. The overwrite option has been deprecated, and replaceOne does not return the updated document.

For those stumbling upon this tortured path, findOneAndReplace is your friend.

Reasons:
  • Low length (0.5):
  • No code block (0.5):
Posted by: Tim Hardy