Reputation: 71
Could you please help me we my problem. I have service wich cache all requests results to core data. I use RestKit for do that. All work fine except saving. Then i try change some property in object and then save it NSManagedObjectContext save method done with out errore but if i look in this object after saving changes i see:
<User: 0xcedf910> (entity: User; id: 0xcede9f0 <x-coredata://904DBCDF-F1CF-4F2B-B173-2994FE47DEC8/User/p1800> ; data: <fault>)
And then try to get data from over object i get fault:
*** Terminating app due to uncaught exception 'NSObjectInaccessibleException', reason: 'CoreData could not fulfill a fault for '0xcedbce0 <x-coredata://904DBCDF-F1CF-4F2B-B173-2994FE47DEC8/User/p1722>
Code for fetching objects:
[objectManager.objectStore objectsForResourcePath:path]
Could any help with it? Thank you.
Upvotes: 0
Views: 225
Reputation: 26972
NSObjectInaccessibleException, means just that.
It's possible that you created an NSManagedObject and put it in the context, possibly saved a reference to it somewhere. Then it was removed from the context and wasn't saved and you tried to access it again.
Upvotes: 0