[SERVER-41629] mongodb joining local field array with another table Created: 11/Jun/19  Updated: 11/Jun/19  Resolved: 11/Jun/19

Status: Closed
Project: Core Server
Component/s: Aggregation Framework
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: dipika Assignee: Danny Hatcher (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

I have one table membership and another is promo codes.

membership table:
 /* 1 */
{
"_id" : ObjectId("5b62e7050b13587e9febb8db"),
"country_id" : "5a093507f1d45633844096ef",
"type" : "Bronze",
"price" : "30",
}
/* 2 */
{
"_id" : ObjectId("5b6961175140b477032291b7"),
"country_id" : "5a093507f1d45633844096ef",
"type" : "Gold",
"price" : "1000",
}....
promo code table :
 {
"_id" : ObjectId("5cfe23fd075be65883f6d921"),
"final_status" : 1,
"membership" : [
ObjectId("5b62e7050b13587e9febb8db"),
ObjectId("5b6961175140b477032291b7"),
ObjectId("5b6961285140b477032291b8"),
ObjectId("5b7567dd5b874856981b53d3"),
ObjectId("5bba1c3794c6761db256edbc")
],
"month" : [
"1",
"3"
]
}
here, the promomcode table has a membership id. I want promo code data with membership join query.get promo code data with membership detail Please help me



 Comments   
Comment by Danny Hatcher (Inactive) [ 11/Jun/19 ]

The SERVER project is for bugs and feature suggestions for the MongoDB server. As this ticket does not appear to a bug, I will now close it. If you need assistance writing queries, I encourage you to ask our community by posting on the mongodb-user group or on Stack Overflow with the mongodb tag.

Generated at Thu Feb 08 04:58:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.