PFObject *myPost = [PFObject objectWithClassName:@"Post"];
[myPost setObject:@"I'm Hungry" forKey:@"title"];
[myPost setObject:@"Where should we go for lunch?" forKey:@"content"];
PFObject *myComment = [PFObject objectWithClassName:@"Comment"];
[myComment setObject:@"Let's do Sushirrito." forKey:@"content"];
[myComment setObject:myPost forKey:@"parent"];
[myComment setObject:[PFObject objectWithoutDataWithClassName:@"Post" objectId:@"1zEcyElZ80"] forKey:@"parent"];
[myComment saveInBackground];
PFQuery *q = [PFQuery queryWithClassName:@"Comment"];
PFObject *fetchedComment = [q getObjectWithId:@"1zEcyElZ80"];
PFObject *post = [fetchedComment objectForKey:@"parent"];
[post fetchIfNeededInBackgroundWithBlock:^(PFObject *obj, NSError *error) {
NSString *title = [post objectForKey:@"title"];
}];
PFUser *user = [PFUser currentUser];
PFRelation *relation = [user relationforKey:@"likes"];
[relation addObject:post];
[user saveInBackground];