Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Adding item to a relation on Parse
// You can do that in your Chrome Console
// Load the initial object, like an Attempt
var attempt = new Parse.Object("Attempt"); = "myId";
// Get the relation "handler" from the attempt object
var relation = attempt.relation("products");
// Add some products to the relation. They don't need to be fetched, just to have an "id" property
var product = new Parse.Object("Products"); = "id1";
// Let's add others product, we can use the same object as only the id matters = "id2";
// let's save the object to reflect the changes in Parse
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.