Skip to content

Instantly share code, notes, and snippets.

@osheroff
Created April 11, 2013 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save osheroff/5361166 to your computer and use it in GitHub Desktop.
Save osheroff/5361166 to your computer and use it in GitHub Desktop.
crash parese
<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