-
Re: [NSSet intersectsSet:]: set argument is not an NSSet
Macho Man Randy Savage Mar 4, 2016 11:34 AM (in response to Macho Man Randy Savage)Hmm... this workaround is working (for now)...override the generated 'add' method and do this:
-(void)addNewMarkerObject:(MarkerObject *)marker { //Avoid crash by adding the object this way. marker.parent = self; }
Haven't tried the methods Core Data generates for reordering, ect...hope they work...
Anyone know if this was a regression? Five year old bug, seems like a pretty long time.
-
Re: [NSSet intersectsSet:]: set argument is not an NSSet
slew Mar 4, 2016 11:38 AM (in response to Macho Man Randy Savage)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!
-
Re: [NSSet intersectsSet:]: set argument is not an NSSet
Macho Man Randy Savage Mar 4, 2016 12:09 PM (in response to slew)I saw that as one of the other suggessted workarounds. Not sure which workaround is better. I'm leaning more toward adding the object the way I have it now, instead of copying the entire set (though I don't know what Core Data is doing under the covers, so it really may not be anymore effecient).
-
Re: [NSSet intersectsSet:]: set argument is not an NSSet
Macho Man Randy Savage Mar 5, 2016 3:48 PM (in response to Macho Man Randy Savage)Err, the other methods also cause crashes...pretty disappointing bug.
It looks like your workaround may the better way to handle this problem...I'm using it in a override of the method that adds multiple objects.
-
-
Re: [NSSet intersectsSet:]: set argument is not an NSSet
devT2S Apr 16, 2019 4:37 AM (in response to slew)This is no longer working
-
-