Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Job.update(
- {estimateSet: {"$elemMatch": {_id: estimateID}}},
- {$push:
- {
- "estimateSet.$.lineItemSet":
- {
- 'name' : lineItem.name,
- 'description' : lineItem.description,
- 'quantity' : parseInt(lineItem.quantity),
- 'cost' : parseInt(lineItem.cost),
- '_id': lineItem._id
- }
- }
- },
- {upsert:false,safe:true},
- function (err) {
- console.log("Job.update - push lineItemSet");
- console.log("err: ", err);
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment