Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-41629

mongodb joining local field array with another table

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Aggregation Framework
    • Labels:
      None
    • ALL

      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

            Assignee:
            daniel.hatcher@mongodb.com Danny Hatcher (Inactive)
            Reporter:
            dipika dipika
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: