How to save an embedded document using Node Driver

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: 1.4
    • Component/s: None
    • Environment:
      Sails.js v0.10.0-RC8 , Mongo 2.6.1
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Can I insert following record using node-mongodb-native?
      (Nested document-embedded)

      {
      "_id" : 1,
      "date" : ISODate("2014-08-01T06:00:00.000Z"),
      "personel" : {
      "personel_id" : 1,
      "personel_name" : "Jason Kidd",
      "dealer" : {
      "dealer_id" : 1,
      "dealer_name" : "RDC Pro.",
      "dealer_commercial_name" : "RDC Pro. Manufacturing",
      "address" :

      { "street" : "Mill Road 5. Street", "district" : "Sample District", "city" : "Sample City", "province" : "Sample Province" }

      }
      },
      "customer" : {
      "customer_id" : 5,
      "id" : "66550066000",
      "name" : "John Stockton",
      "phone" : "08763314331",
      "email" : "john@stockton.com",
      "car" : {
      "plate" : "34-SMK-07",
      "brand" : "Mercedes",
      "model" : "CLK-200",
      "year" : 2009,
      "sample_photo" :

      { "photo_id" : "related_files_id" }

      },
      "address" :

      { "street" : "Sample Customer Street", "district" : "Sample Customer District", "city" : "Sample Customer City", "province" : "Sample Customer Province" }

      },
      "product" :

      { "product_id" : 3, "name" : "Sample Product Name", "quantity" : 1, "price" : 350 }

      ,
      "payment" : {
      "type" : "Credit Card",
      "tally_system" :

      { "installment_count" : 6 }

      ,
      "gift_card" : "",
      "total_amount" : 350,
      "discount_ratio" : 10,
      "total_amount_after_discount" : 315
      },
      "signature_id" : "related_files_id",
      "sold" : true
      }

            Assignee:
            Christian Amor Kvalheim
            Reporter:
            efkan turen
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: