Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- subDocSchema.post('save'. function (doc) {
- console.log(doc);
- }
- parent.subDocs.push({note: 'new doc'});
- parent.save();
- // {note: 'new doc'}
- // {note: 'old doc'}
- // ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement