mongoose中针对collection 名称自动小写解决办法

2018-11-01  本文已影响12人  letcoda

cnode中文社区

1.xxschema = new Schema({
…
}, {collection: “your collection name”});

2.mongoose.model(‘User’, UserSchema, “your collection name”);
上一篇 下一篇

猜你喜欢

热点阅读