Answers for "mongoose nullable"

1

mongoose nullable

var userSchema = new mongoose.Schema({
  name: {type: String, required: true},
  preferences: {type : { preference1 : String, preference2 : String}, default : null}
});
Posted by: Guest on July-28-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language