Mantle / MTLManagedObjectAdapter

Core Data support for Mantle
https://github.com/Mantle/Mantle
MIT License
140 stars 55 forks source link

+managedObjectKeysByPropertyKey does not support NSNull, despite docs #7

Open ainopara opened 9 years ago

ainopara commented 9 years ago

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

jspahrsummers commented 9 years ago

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

ainopara commented 9 years ago

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.

jspahrsummers commented 9 years ago

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

I'll update this issue to clarify the problem.