API Docs for:

Class Parse.Relation

Creates a new Relation for the given parent object and key. This constructor should rarely be used directly, but rather created by Parse.Object.relation.

Parse.Relation( parent, key )
Parameters:
  • parent <Parse.Object>

    The parent of this relation.

  • key <String>

    The key for this relation on the parent.

    A class that is used to access all of the children of a many-to-many relationship. Each instance of Parse.Relation is associated with a particular parent object and key.

add( objects )

Adds a Parse.Object or an array of Parse.Objects to the relation.

Parameters:
  • objects <Object>

    The item or items to add.

Parse.Query query( )

Returns a Parse.Query that is limited to objects in this relation.


Returns: <Parse.Query>
remove( objects )

Removes a Parse.Object or an array of Parse.Objects from this relation.

Parameters:
  • objects <Object>

    The item or items to remove.

Object toJSON( )

Returns a JSON version of the object suitable for saving to disk.


Returns: <Object>