I am using CoreData objects in iOS.
A product has subproducts
@property (nonatomic, retain) NSOrderedSet *subProducts;
For some reason, for one of the products , instead of getting a NSOrderedSet, I am getting a _NSFaultingMutableSet. I cant use objectAtIndex method on that object but I can iterate over it using a for.
What is that _NSFaultingMutableSet class?
An
_NSFaultingMutableSetis a private CoreData subclass ofNSMutableSet. Are you sure your .xcdatamodel declares the relationship as ordered? Just because your code declares the property asNSOrderedSetdoesn’t mean it necessarily is; that’s controlled entirely by the data model.