Core data iterate over fetchrequest in chunks with setFetchLimit only processing half the records
问题 I am trying to process a lot of objects in chunks of a certain size (batchSize). This loop seems to work, but it processes only half the records. Relevant piece of code is: { //Prepare fetching products without images in the database NSFetchRequest * productFetchRequest = [NSFetchRequest fetchRequestWithEntityName:@"Product"]; //Sort by last changed photo first NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"photoModificationDate" ascending:NO]; [productFetchRequest