莫回无
var studentSchema = new Schema({
school:String,
nickname:String,
username:{
type:String,
unique:true
},.....
}我的schema是那样弄得,你试下下面的看看可以不name:{type:String,unique:true},
address:{type:String,unique:true}