magicalpanda / MagicalRecord

Super Awesome Easy Fetching for Core Data!
Other
10.8k stars 1.79k forks source link

Magical record auto migration fails with an attribute of binary data in an entity. #1299

Open zeeshansuleman opened 7 years ago

zeeshansuleman commented 7 years ago

hello guyz i am facing an issue during automigration of magical record.My scenario is. ->i added a new entity into my model and added following line for auto migration. [MagicalRecord setupCoreDataStackWithAutoMigratingSqliteStoreNamed:@"EmergencDatabase.sqlite"]; ->I added an attribute of type binary data in my new entity.(Note:for string type it works) ->when i run the app for testing , magical record failed to fetch values from existing entities .and it always fetch null values.

please help me in resolving the said issue. thanks.

screen shot 2017-04-06 at 11 34 10 am
souvickcse commented 7 years ago

Option 1. You have to delete the app and run it after changing the xcdatamodel. Option 2. You have to add new version of the data model, before the changes and update on it. You dont have to delete the app in this case.

zeeshansuleman commented 7 years ago

@souvickcse i donot want to delete the app , for this i used auto migration with magical record , but the issue is that entity values always retreived as Null.

souvickcse commented 7 years ago

Go for option 2

zeeshansuleman commented 7 years ago

@souvickcse in my case option 2 did not work though.