Created
April 11, 2013 06:23
-
-
Save osheroff/5361166 to your computer and use it in GitHub Desktop.
crash parese
This file contains hidden or 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
<html> | |
<head> | |
<script src="http://www.parsecdn.com/js/parse-1.2.3.js"></script> | |
</head> | |
</html> | |
<script> | |
Parse.initialize("", ""); | |
var Parent = Parse.Object.extend("Parent"); | |
var Child = Parse.Object.extend("Child"); | |
var p = new Parent(); | |
p.save({name: 'parent'}).then(function(p) { | |
var child = new Child(); | |
child.save({name: 'child', parent_obj: p}) | |
.then(function(c) { | |
p.set({c: [child]}); | |
p.save(); | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment