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)
Adds a Parse.Object or an array of Parse.Objects to the relation.
Parameters:
Name | Type | Description |
---|---|---|
objects |
The item or items to add. |
query() → {Parse.Query}
Returns a Parse.Query that is limited to objects in this relation.
Returns:
- Type:
-
Parse.Query
remove(objects)
Removes a Parse.Object or an array of Parse.Objects from this relation.
Parameters:
Name | Type | Description |
---|---|---|
objects |
The item or items to remove. |
toJSON() → {Object}
Returns a JSON version of the object suitable for saving to disk.
Returns:
- Type:
-
Object