I get this crash, when adding an object to its parent and the relationship was configured to be "ordered".
I googled around, saw various suggested workarounds, some date back all the way to 2011. Anyway I can get the generated property to be an ordered set, or do I have to override all these manually?
Not sure if this will help or not, but, I have experienced something similar with "Ordered" relationships within Core Data. Here is what I ended up doing.
- (void)addReportQueriesObject:(ReportQuery *)value {
NSMutableOrderedSet* tempSet = [NSMutableOrderedSet orderedSetWithOrderedSet:self.reportQueries];
[tempSet addObject:value];
self.reportQueries = tempSet;
}
basically I have to initialize a new ordered set, add my new value to that newly allocated ordered set, THEN save that into my ManagedObject. Hope this helps!