objective c - Core Data: Error if deleting unsaved object -
I have some problems with core data projects I have NSArrayController with NSManagedObjects, and +/- Button if the file is saved , I remove an object in the line, it works perfectly, but if I add a new object, and remove it immediately (without changing any default value), I Receives an error:
Critical Application Error Core da An exception was caught during the changeover process: Mathematical function unknown number for expression or zero. Anonymous number type or zero arithmetic function expression was passed with user infos (null).
This is the only case if I cancels adding new objects.
What can anyone do to give me an indicator? I think there is something to do with it that there is only one temporary id in it, but I do not know how to solve it.
I found the problem and the solution I would describe it for the record.
The problem was that the object in its init function added a supervisor to itself. This is probably how the error was triggered if I remove the object as a supervisor before deleting the item, then the error does not occur.
Comments
Post a Comment