CoreStore icon indicating copy to clipboard operation
CoreStore copied to clipboard

Fetching by ObjectID

Open puelocesar opened this issue 7 years ago • 1 comments

I have an uriRepresentation of an NSManagedObject saved somewhere in my app, and I want to fetch that object using CoreStore. Problem is, NSPersistentStoreCoordinator().managedObjectID(forURIRepresentation: url) always returns nil for me. Is there a special way of doing this on CoreStore?

puelocesar avatar Apr 02 '19 09:04 puelocesar

CoreStore doesn't really do anything special here, so there's probably something in the way you're using uriRepresentation.

Are you sure that the uriRepresentation you are saving are not from temporary object IDs?

JohnEstropia avatar Apr 11 '19 22:04 JohnEstropia