Last active
November 25, 2015 12:20
-
-
Save hirenrojasara/1843f37b355d1a808b65 to your computer and use it in GitHub Desktop.
Mongoose hide version key / __v for all collections / schemas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// After Registsering all mongoose schema, run below code to make versionKey false in all registerd schemas. | |
for(var i in mongoose.modelSchemas){ | |
mongoose.modelSchemas[i].options.versionKey = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment