title: Using RKManagedObjectRequestOperation with getObjectsAtPath
body: <p>I am developing a todo list app using RestKit on iOS, i have added a fetch results block for deletion of orphaned objects from official class reference from this link (<a href="http://restkit.org/api/latest/Classes/RKManagedObjectRequestOperation.html" rel="nofollow">http://restkit.org/api/latest/Classes/RKManagedObjectRequestOperation.html</a>)</p>
  
  <p>Now the documentation says whenever any <code>RKManagedObjectRequestOperation</code>s execute, the fetch result block will check for orphaned objects and delete the objects automatically that are not present on server.</p>
  
  <p>I am using the following code to make request, but the problem is <code>getObjectsAtPath</code> creates <code>RKObjectRequestOperation</code> and I need <code>RKManagedObjectRequestOperation</code> can any one guide me on what to do in this scenario?</p>
  
  <p>With <code>RKObjectRequestOperation</code> the orphaned objects are not getting deleted if they no longer exist on server.</p>
  
  <pre><code>[[RKObjectManager sharedManager] getObjectsAtPath:@"/api/lists"
                                         parameters:nil
                                            success:^(RKObjectRequestOperation *operation, RKMappingResult *mappingResult) ...
  </code></pre>
  
  <p>Mapping:</p>
  
  <pre><code>RKEntityMapping *listEntityMapping = [RKEntityMapping mappingForEntityForName:@"List" inManagedObjectStore:managedObjectStore];
  </code></pre>
  
  <p>Response descriptor:</p>
  
  <pre><code>responseDescriptor = [RKResponseDescriptor responseDescriptorWithMapping:listEntityMapping method:RKRequestMethodGET pathPattern:@"/api/lists" keyPath:nil statusCodes:RKStatusCodeIndexSetForClass(RKStatusCodeClassSuccessful)];
  </code></pre>
  
  <p>JSON:</p>
  
  <pre><code>[
      {
          "list_id": "1",
          "listName": "List Name 1"
      },
      {
          "list_id": "2",
          "listName": "List Name 2"
      },
      {
          "list_id": "5",
          "listName": "List Name 3"
      },
      {
          "list_id": "7",
          "listName": "List Name 4"
      },
      {
          "list_id": "8",
          "listName": "List Name 5"
      },
      {
          "list_id": "11",
          "listName": "List Name 6"
      },
      {
          "list_id": "12",
          "listName": "List Name 7"
      }
  ]
  </code></pre>