MTLManagedObjectAdapter icon indicating copy to clipboard operation
MTLManagedObjectAdapter copied to clipboard

+managedObjectKeysByPropertyKey does not support NSNull, despite docs

Open ainopara opened this issue 10 years ago • 3 comments

replace all the if (managedObjectKey == nil) to if (managedObjectKey == nil || [managedObjectKey isEqual:[NSNull null]]) will resolve the crash issue.

ainopara avatar Apr 12 '15 01:04 ainopara

It sounds like you've specified NSNull where it isn't allowed. Can you please share the actual code you're using?

jspahrsummers avatar Apr 13 '15 04:04 jspahrsummers

Yes, I assign keys that not be used to NSNull.null. like @"history": NSNull.null Remove those null things will make it work again without modify the adapter.

ainopara avatar Apr 14 '15 01:04 ainopara

Ah, I see—it looks like the documentation for +managedObjectKeysByPropertyKey is incorrect. Sorry about that.

I'll update this issue to clarify the problem.

jspahrsummers avatar Apr 14 '15 02:04 jspahrsummers