Mantle / MTLManagedObjectAdapter

Core Data support for Mantle

Home Page:https://github.com/Mantle/Mantle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

+managedObjectKeysByPropertyKey does not support NSNull, despite docs

ainopara opened this issue · comments

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

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

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.

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

I'll update this issue to clarify the problem.