Error migrating: "Unacceptable type of value for attribute"
Error migrating: "Unacceptable type of value for attribute"
- Subject: Error migrating: "Unacceptable type of value for attribute"
- From: Rick Mann <email@hidden>
- Date: Fri, 27 Feb 2015 20:10:26 -0800
Up until now I've been carefully migrating a few attributes at a time to my new schema. Part of this involved renaming some properties. I use a Mapping Model and automatic migration, and this has worked fine.
Because Xcode forces me to start from scratch with the Mapping Model file each time I make a change to the schema, after I was confident I was going to be able to do the migration, I did all the remaining couple dozen attributes, updated the data model, created a new Mapping Model, and set all the value expressions.
Now, when creating the persistent store coordinator and migrating from v2 to v3, I get this error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Unacceptable type of value for attribute: property = "endDate"; desired type = NSDate; given type = __NSCFNumber; value = 0.'
Thing is, endDate did not change. It has always been an NSDate. The underlying sql shows it as TIMESTAMP. The mapping model is:
endDate $source.endDate
The values for ZENDDATE are reasonable or null, as expected. "endDate" is an optional Date attribute.
Any ideas? Thanks!
--
Rick Mann
email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden