Let's say I have a parent object, each of which has several children. I want all parents to be sorted by number of children. Something similar to the following pseudo-code:
NSEntityDescription * entity = [NSEntityDescription entityForName:@"Parent" inManagedObjectContext:managedObjectContext]; [[NSSortDescriptor alloc] initWithKey:@"children.count" ascending:NO];
Is there a way to build such a sample using kernel data? If there is no way to do this, sorting using sortedArrayUsingSelector: will lose the benefits of the batch size _PFBatchFaultingArray?
Thanks Ben
objective-c core-data
Ben reeves
source share