-4
product[{
"_id" : ObjectId("5720cc7d6e589904b855cc12"),
"p_id" : "p0001",
"p_name" : "printed_pant",
"p_company" : "Hoffman",
"p_price" : 3677.0,
"p_color" : "charcol",
"p_size" : "XL",
"total_price" : 77217.0,
"total_sell" : NumberInt(21)
}]
branch[{
"_id" : {
"c_branch_id" : "b03",
"c_branch_location" : "Hydrabad",
"p_id" : "p0001",
"p_name" : "kurty_pajam"
},
"total_item" : NumberInt(8)
}]
我怎麼能在上面提到的集合中使用$lookup
? 其中product是leftcollection,branch是rightcollection。
是的,我想這一點,但它不工作.. –
@BiswajitMaity這是爲什麼'foreignField: 「_id的p_id」'(空格) – Max
謝謝@Max ......它的工作... –