Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save renatoargh/4771815 to your computer and use it in GitHub Desktop.

Select an option

Save renatoargh/4771815 to your computer and use it in GitHub Desktop.
Como renomear ou remover a chave de versionamento no mongoose 3
var municipioSchema = new Schema({
nome: { type: String, required: true, trim: true },
estado: { type: String, required: true }
}, { versionKey: false }); //remove a chave de versionamento
var municipioSchema = new Schema({
nome: { type: String, required: true, trim: true },
estado: { type: String, required: true }
}, { versionKey: "versao" }); //renomeia a chave de versionamento
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment