Causes of "Cannot update object that was never inserted"
Causes of "Cannot update object that was never inserted"
- Subject: Causes of "Cannot update object that was never inserted"
- From: Jerry Krinock <email@hidden>
- Date: Sun, 16 Jun 2013 22:13:41 -0700
About once a month, I get a report from a user indicating that my app raised an exception, "Cannot update object that was never inserted". Last week I got two of these, so I'm looking harder to try and find the cause.
I presume this "object" is a Core Data managed object. From reading on this topic, I've gleaned two possible causes of this exception…
1. Managed object was created with -init instead of +[NSEntityDescription insertNewObjectForEntityForName:inManagedObjectContext:].
2. Managed object's context was accessed from multiple threads. Maybe an updating thread got ahead of the inserting thread somehow? That would be weird.
Are there any other causes of "Cannot update object that was never inserted" that I should be looking for?
Thank you,
Jerry Krinock
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden