any86 opened this issue 3 years ago · 0 comments
const User = mongoose.model('user', schema);
如果使用"User"新增了数据, 默认会在库中新建"users"collection, 如果想操作"user", 那么就要用到第三个参数:
const User = mongoose.model('users', schema,'users');