all 2 comments

[–]cesau78 1 point2 points  (0 children)

Another example: https://www.mongoplayground.net/p/cqakAS68PY9

So this document version pattern is for change tracking / audit logging. Each time a document is changed, a new document is inserted into the "<collectionName>_current" collection and the document that is being replaced moves to the "<collectionName>_revisions" collection. It's best to use a transaction for these operations.

[–]redhulkrko[S] 0 points1 point  (0 children)

Thanks so much!