diff --git a/lib/index.js b/lib/index.js index 90547f1e95b..641e19fe876 100644 --- a/lib/index.js +++ b/lib/index.js @@ -507,12 +507,14 @@ Mongoose.prototype.pluralize = function(fn) { * * // or * - * const collectionName = 'actor' - * const M = mongoose.model('Actor', schema, collectionName) + * const collectionName = 'actor'; + * const M = mongoose.model('Actor', schema, collectionName); * * @param {String|Function} name model name or class extending Model * @param {Schema} [schema] the schema to use. * @param {String} [collection] name (optional, inferred from model name) + * @param {Object} [options] + * @param {Boolean} [options.overwriteModels=false] If true, overwrite existing models with the same name to avoid `OverwriteModelError` * @return {Model} The model associated with `name`. Mongoose will create the model if it doesn't already exist. * @api public */