Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with new properties in a new Core-Data version #31

Open
grobii opened this issue Nov 15, 2014 · 0 comments
Open

Error with new properties in a new Core-Data version #31

grobii opened this issue Nov 15, 2014 · 0 comments

Comments

@grobii
Copy link

grobii commented Nov 15, 2014

I updated my Core Data model to a new version.
In this version i only added a new non optional attribute with a default value (BOOL).
After getting old Data from dropbox, the core data save process fails,
because ParcelKit trys to set a nil value to an non optional attribute in line
116 from NSManagedObject+ParcelKit.h
[strongSelf setValue:value forKey:propertyName];

I think that is not the right behaviour.
You can easily fix this by adding:

if(value || [propertyDescription isOptional])
 {
            [strongSelf setValue:value forKey:propertyName];
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant