Saving multiple objects in Parse using more than one API request?

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 [.....] }) 
+1
source share
1 answer

The saveAll method is no longer considered 1 API call. Now it is considered 1 API call to save EVERY object. See here for more information: stackoverflow.com/q/25690439/3344977

0
source

Source: https://habr.com/ru/post/1201935/


All Articles