I’ve run into a problem where I insert a managed object into a managed object context, in a separate thread, and then return the object ID to the main thread and then retrieve the object from the main thread’s context using that ID.
It didn’t always work. It is because I saved the first managed object context after I took the object ID. And the object ID was temporary because the object hadn’t been persisted.
Read more →