Reputation: 375
I want to add versioning to my documents in my MongoDB. Are there any best practices for versioning in MongoDB? And what's the simplestway to versioning documents in my MongoDB?
Upvotes: 12
Views: 9003
Reputation: 171
You could try the approach specified in the document versioning pattern, before you choose this approach make sure that the use case matches the criteria specified i.e. The Document Versioning Pattern makes a few assumptions about the data in the database and the data access patterns that the application makes.
If you find that these assumptions don’t fit your use case, this pattern may not be a great fit. You may have to alter how you implement your version of the Document Versioning Pattern or your use case may simply require a different solution.
Upvotes: 2