【发布时间】:2018-04-07 03:31:58
【问题描述】:
我将 NodeJS 与 Mongoose 一起使用。我有一个集合“用户”,其架构如下:
id: String
name: String
surname: String,
otherField1: Number,
otherFieldN: String,
arrayField: [String],
messages:[
{
date: SchemaTypes.Long,
id: String,
type: String,
content: String
}
],
status:String
我确切地说,在第二种情况下(更多查询),根据第一次查询的结果将更改后续查询所需的字段
【问题讨论】:
标签: node.js mongodb mongoose nosql