【发布时间】:2014-09-16 11:59:57
【问题描述】:
我在 nodejs 中有一个带有猫鼬的用户模式,就像这样
userschema = mongoose.Schema({
org: String,
username: String,
fullname: String,
password: String,
email: String
});
除了有时我需要添加更多字段。
主要问题是:我可以在 monogoose 架构中包含可选字段吗?
【问题讨论】:
标签: node.js mongodb mongoose schema