Constructor
new Relation(parent, key)
Parameters:
Name | Type | Description |
---|---|---|
parent |
Parse.Object
|
The parent of this relation. |
key |
string
|
The key for this relation on the parent. |
Methods
add(objects) → {Parse.Object}
Adds a Parse.Object or an array of Parse.Objects to the relation.
Parameters:
Name | Type | Description |
---|---|---|
objects |
Parse.Object
|
Array
|
The item or items to add. |
remove(objects)
Removes a Parse.Object or an array of Parse.Objects from this relation.
Parameters:
Name | Type | Description |
---|---|---|
objects |
Parse.Object
|
Array
|
The item or items to remove. |
toJSON() → {object}
Returns a JSON version of the object suitable for saving to disk.
Returns:
- Type:
-
object
JSON representation of Relation