【发布时间】:2012-12-10 19:58:06
【问题描述】:
我有一个现有的架构,例如
exports.OldCollectionSchema= new Schema({
Id: { type: Schema.ObjectId },
parentId: { type: Schema.ObjectId },
userId: { type : String },
userName: { type : String })
现在,我想通过添加一个新字段type在两个场景中使用上述集合
类型将是场景 a 或场景 b
所以我想获取旧记录 + type = "scenario a" 并在页面中显示它
这怎么可能?
【问题讨论】: