Created
March 10, 2011 16:55
-
-
Save xcoderzach/864450 to your computer and use it in GitHub Desktop.
idea
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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