Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

mongoose collection name

/*
	Mongoose by default produces a collection name by passing the model name to the
	utils.toCollectionName method. This method pluralizes the name. Set 
	this option if you need a different name for your collection.
*/

const dataSchema = new Schema({..}, { collection: 'data' });
 
PREVIOUS NEXT
Tagged: #mongoose #collection
ADD COMMENT
Topic
Name
1+3 =