【发布时间】:2014-03-31 20:06:18
【问题描述】:
假设我已经为 userId 中的 id 设置了对象引用:
{
"__v" : 0,
"_id" : ObjectId("530d8aa855df0c2d269a5a58"),
"active" : false,
"address" : "some ip address",
"createDate" : ISODate("2014-02-26T06:33:12.367Z"),
"displayName" : "coolguy55",
"fullName" : "super cool guy 55",
"userId" : [
ObjectId("an ID"),
ObjectId("an ID")
]
}
我想知道是否可以在单个填充语句中填充这两个 id?
【问题讨论】:
标签: node.js mongodb mongoose populate