1.xxschema = new Schema({
…
}, {collection: “your collection name”});
2.mongoose.model(‘User’, UserSchema, “your collection name”);
1.xxschema = new Schema({
…
}, {collection: “your collection name”});
2.mongoose.model(‘User’, UserSchema, “your collection name”);
本文标题:mongoose中针对collection 名称自动小写解决办法
本文链接:https://www.haomeiwen.com/subject/wmgxxqtx.html
网友评论