Skip to content

Instantly share code, notes, and snippets.

@aheckmann
Created June 27, 2012 17:21
Show Gist options
  • Save aheckmann/3005517 to your computer and use it in GitHub Desktop.
Save aheckmann/3005517 to your computer and use it in GitHub Desktop.
v3-pt2-query-findoneandupdate
Cat
.where('name', 'Sprinkls')
.findOneAndUpdate({ name: 'Sprinkles' })
.setOptions({ new: false })
.exec(function (err, cat) {
if (err) ..
render('cat', cat);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment