How can I determine an Entities' Attribute datatype in Core Data?
In Core Data I have an entity called item which has the the attribute score.
Currently score has the type int16_t.
scores value is updated from different places within the project, by
parsing it via [[UITextField text] integerValue], while keeping an open
eye for overflow.
scores datatype is very likely to change in the future. I want to minimise
future risk associated with that change.
The only way I can think of is by the preprocessor macro #define
itemScore_t int16_t.
Is there a better way, such as determining the datatype directly from Core
Data?
No comments:
Post a Comment