Skip to content

Instantly share code, notes, and snippets.

@xcoderzach
Created March 10, 2011 16:55
Show Gist options
  • Save xcoderzach/864450 to your computer and use it in GitHub Desktop.
Save xcoderzach/864450 to your computer and use it in GitHub Desktop.
idea
Document.find({user-id: 10, money: {$gt: 20}}, function() {
collection.on("add", function(item) {
console.log(item.money) //40
})
Document.create({user-id:10, money: 40}) //collection should call onAdd and contain the new document automagically
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment