title: Maintaining RKObjectManager/AFHTTPClient request ordering
body: <p>I've got an iOS app that uses RestKit with Core Data persistence. It loads its data from a few different endpoints, most of which return complete object graphs as nested JSON objects. But one of the endpoints returns objects that contain foreign key references (not nested JSON) to another endpoint's data.</p>
  
  <p>In other words (abbreviated):</p>
  
  <pre><code>[postMapping addAttributeMappingsFromArray:@[ @"postID", ... ]];
  
  // ...
  
  [commentMapping addAttributeMappingsFromArray:@[ ... ]];
  [commentMapping addConnectionForRelationship:@"post" connectedBy:@"postID"];
  </code></pre>
  
  <p>where the relevant <code>Post</code> and <code>Comment</code> entities are set up with the appropriate relationships and so forth.</p>
  
  <p>This all works exactly as it should <em>but only if</em> the request to fetch posts finishes <em>before</em> the request to fetch comments. Otherwise a comment won't be connected to its post, because the post hasn't been fetched and mapped yet.</p>
  
  <p>Right now, I'm getting around it by just not fetching the comments until the posts have been fetched. Something like</p>
  
  <pre><code>- (void)fetchPosts {
      [objectManager getObjectsAtPath:@"/posts.json"
                           parameters:nil
                              success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) {
                                  [self fetchComments]; // *now* we can fetch comments
                                  // ...
  </code></pre>
  
  <p>But I'm wondering if there's a better way?</p>
  
  <p>I figure I might be able to do something like</p>
  
  <pre><code> [objectManager.HTTPClient.operationQueue setMaxConcurrentOperationCount:1];
  </code></pre>
  
  <p>but most of the time, I <em>do</em> want concurrent requests. It's only two of the requests that must be sequential.</p>
  
  <p>I guess I could set up two different object managers (one that does sequential requests and one that does concurrent ones), but I'm not sure that makes sense.</p>
  
  <p>So, is there are way to specify that two specific <code>-getObjectsAtPath:...</code> requests should be handled sequentially, while all other can run whenever?</p>