From what I can tell from the Parse and Stack Overflow PFObject.saveAllInBackground , PFObject.saveAllInBackground only needs 1 API request to save all objects.
My method saves the object, then returns and saveAll 2 more objects. It seems that it should only accept 2 API requests, however Parse Analytics tells me that it accepts 3.
Any guesses? Here is the code:
// Create new Vote object var voteObject = PFObject(className: "Votes") [.....] voteObject.saveInBackgroundWithBlock { (succeeded: Bool!, error: NSError!) -> Void in if (succeeded == true){ // Add relation for postObject self.postObject.relationForKey("UserVotes").addObject(voteObject) // Add relation for user object PFUser.currentUser().relationForKey("userVotes").addObject(voteObject) PFObject.saveAllInBackground([self.postObject, PFUser.currentUser()], block: { (succeeded: Bool!, error: NSError!) -> Void in [.....] })
source share