I recently started the programming path in Objective-C, and now I'm browsing Core Data. However, I am confused about exactly what the model itself defines in Core Data.
Here's what I mean: Let's say I create an object with some set of attributes using the graphical model builder. Then I get the Xcode for the corresponding class. Then I want to create a property in the class that will be used only at run time, and it does not need to be stored or retrieved from Core Data. So, I add a variable and the corresponding property to the class (synthesizing it in the implementation)
The new property is not defined in the model builder, but it is defined in the class derived from NSManagedObject. How is it processed in Core Data? Are the properties listed in the class associated with attributes in the "model", or are only the attributes defined in the model builder that define the model?
Likewise, I wanted to add an enumerated class property to a class file that, when retrieved or installed, accesses or changes the NSNumber attribute in the model. Can I do this if Core Data treats the property as an attribute that needs to be saved and retrieved?
THANKS!
source
share