我有两个集合:用户:
{
_id: ObjectId('123...'),
docs: [
ObjectId('512d5793abb900bf3e000002'),
ObjectId('512d5793abb900bf3e000001')
]
}
文档:
{
_id: ObjectId('512d5793abb900bf3e000002'),
name: 'qwe',
...
}
{
_id: ObjectId('512d5793abb900bf3e000001'),
name: 'qwe2',
...
}
我想从 ids 获取文档。我尝试了这个解决方案,但我收到了这条消息:
{ db: { domain: null, _events: {}, _maxListeners: 10, databaseName: 'test', ...