I am pretty good at CoreData and have been using it for some years with little or no difficulty. Suddenly, I am now stunned by the mistake. For my life I canβt understand why
insertNewObjectForEntityForName:inManagedObjectContext:
suddenly some strange instance of NSNumber returns. GDB says the returned object has the correct user subclass NSManagedObject, but when I go to print a description of NSManagedObject itself, I get the following error:
*** -[NSCFNumber objectID]: unrecognized selector sent to instance 0x3f26f50
What's even weirder is that I can set some relationships and attributes using setValue: forKey: and all is well. But when I try to establish a specific relationship, I get this error:
*** -[NSCFNumber entity]: unrecognized selector sent to instance 0x3f26f50
Has anyone ever encountered anything similar before? I tried to clear all goals, reset everything, even changing the model to the relationships in question is one thing, not many. Nothing matters.
source share