Ulzurrun de Asanza i Sàez

Little tip about version control in Mongoose

Did you ever encountered this message when working with Mongoose?

VersionError: No matching document found.

This is a good explanation about version control in Mongoose, what it is and why it is useful.

If you are inserting content into the database with MongoDB driver and updating it using Mongoose, be careful! __v won’t be set and if any of your document attributes is an array you can get easily in trouble.


No replies on “Little tip about version control in Mongoose

There are no comments yet.

Leave a Reply

Your email address will not be published.

Required fields are marked *

Your avatar