I am working with an app that needs to import data from a Rest API. Everything looks OK, however when importing the data I see some fields in the database that are declared as numbers but the server side gives them inside "", which will consider them a string.
The importation fails, and none of the data is imported
I implemented a new check in the NSAttributeDescription+MagicalDataImport that, in case of expecting any type of integer, checks if the data is a NSNumber, and if not it tries to convert it.
I also included the unit tests related to it.
Strings are converted to numbers when needed, and therefore the data importation works as expected.
I hope you find everything OK and can me merged quickly.
Added conversion from NSString to NSNumber into imports
Added Unit test for string to number conversion
Seems sensible to me.
I vote for adding this.
Please add it!
 Fix problem with NSStrings trying to be parsed as an object
Fixed problem with To-Many relations retrieved as a single object
Apologies for being behind on this one. I'll talk this over with the team, but first impressions for me are pretty good. Thanks for sending this in!