Skip to content

Instantly share code, notes, and snippets.

@AmitDJagtap
Created November 3, 2019 14:10
Show Gist options
  • Save AmitDJagtap/6c8042a57227fbc20607e621fba9def1 to your computer and use it in GitHub Desktop.
Save AmitDJagtap/6c8042a57227fbc20607e621fba9def1 to your computer and use it in GitHub Desktop.
>> db.findOne(id : xyz, Person).then((data) => {
// data = Hydrate(data);
data.name = 'new name';
data.title = 'Mrs';
db.save(data, Person).then((result) => {
resolve(result);
});
});
>> db.updateFields(Person, { query: { id: data.id }, fields: { $set: { name: 'new Name', title: 'Mrs' } } }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment