1

Can someone please provide an example of how to save a parse.com object via the RESTApi for an object that contains a collection of other related objects?

so object A contains a list of object B where B is a pre-existing object.

1 Answer 1

1

You can add a related object like this:

{
  "__type": "Pointer",
  "className": "GameScore",
  "objectId": "Ed1nuqPvc"
}

Source: https://www.parse.com/docs/rest#objects-types

However, it's not recommended to store a large amount of data in a single instance.

...should not exceed 128 kilobytes in size.

Source: https://www.parse.com/docs/ios_guide#objects-types/iOS

You might be better to create a linked table, e.g. if a 'User' (A) has many a 'Accounts/cars/objects' (B) then create a table userObject and use that to link the two other tables.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.