Reputation: 2811
I created a project using Core Data, and in the .model file I created an entity called Targets.
I added these two entity attributes:
content (String)
targetID (Integer 32)
When I generate the NSManagedObject subclass Xcode asks me:
Use scalar properties for primitive data types?
Should I check this box when generating a new NSManagedObject subclass from my model file?
Upvotes: 11
Views: 5104
Reputation: 5152
If checking the option, the default value for Number
type what you get will be zero, but nil
is more reasonable. So, I don't think you should check the box.
Upvotes: 3
Reputation: 12753
If the box is checked, Xcode will generate scalar types (e.g., int, float, double) for those attributes. If not checked, the attributes will be NSNumber
s.
Upvotes: 16