PFRelation

@interface PFRelation < ObjectType : PFObject * >  : NSObject

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

  • The name of the class of the target child objects.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic, nullable) NSString *targetClass;
  • Returns a PFQuery object that can be used to get objects in this relation.

    Declaration

    Objective-C

    - (nonnull PFQuery<ObjectType> *)query;
  • Adds a relation to the passed in object.

    Declaration

    Objective-C

    - (void)addObject:(nonnull ObjectType)object;

    Parameters

    object

    A PFObject object to add relation to.

  • Removes a relation to the passed in object.

    Declaration

    Objective-C

    - (void)removeObject:(nonnull ObjectType)object;

    Parameters

    object

    A PFObject object to add relation to.