Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongoose schema index of multiple columns

mySchema.index({field1: 1, field2: 1}, {unique: true});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mongoose #schema #index #multiple #columns
ADD COMMENT
Topic
Name
8+2 =