message: issue fixed, mayank
diff: @@ -156,18 +156,28 @@ export function embeddedChildren1(model: Mongoose.Model<any>, values: Array<any>
  if (m.propertyType.isArray) {
  val[m.propertyKey].forEach(x => {
  + if (!param.embedded) {
  let idToCompare = Utils.getObjectIdToCompare(relModel, x)
  if (ids.indexOf(idToCompare) < 0) {
  ids.push(idToCompare);
  }
  + }
  + else {
  + ids.push(x);
  + }
  })
  }
  else {
  + if (!param.embedded) {
  let idToCompare = Utils.getObjectIdToCompare(relModel, val[m.propertyKey])
  if (ids.indexOf(idToCompare) < 0) {
  ids.push(idToCompare);
  }
  }
  + else {
  + ids.push(val[m.propertyKey]);
  + }
  + }
  });
  if (ids.length == 0)
  return;
  