I have a couple places in my application that uses mongoose where I need to handle concurrent modification.
I know there is a version '__v' in all my documents. Most everything I look at points back to this blog:
http://aaronheckmann.tumblr.com/post/48943525537/mongoose-v3-part-1-versioning
Which outlines using the __v field to protect against concurrent array modification within the document. ie:
posts.update({ _id: postId, __v: versionNumber }
, { $set: { 'comments.3.body': updatedText }})
Do mongoose use the __v field automatically in any way to validate documents when they are saved? Or do you always have to add it to your query statement?