user collection
collection1{
"_id" : ObjectId("testusserid"),
"__v" : 0,
name:test...
}
collection2
collection2{
"_id" : ObjectId("collection2 id"),
"__v" : 0,
reported by:_id" : ObjectId("testusserid"),
}
now i want collection1 and collection 2 to implement populate method for fetch name based on reported by_id document on collection2
댓글 없음:
댓글 쓰기