When I create the model objects for my entity in CoreData in ARC mode, it generates retain instead or strong. So does retain work and compiles in ARC mode also? I thought in ARC mode we cannot use release, autorelease and retain keywords?
Data models and model objects are the bread and butter of any Core Data application. We would like to encourage you not to jump to convenience wrappers right away, but to embrace working with managed object subclasses and objects.
Core Data uses a schema called a managed object model — an instance of NSManagedObjectModel. In general, the richer the model, the better Core Data is able to support your application.
If you're looking for a more extensive and step-by-step overview, we recommend you read through Apple's Core Data Programming Guide . The Core Data data model (stored in the *.xcdatamodel file) is where the data types ("Entities" in Core Data) are defined.
Data Model. The Core Data data model (stored in the *.xcdatamodel file) is where the data types (“Entities” in Core Data) are defined. Mostly we will define a data model using Xcode’s graphical interface, but it’s equally possible to create the whole thing in code.
Do you mean that it generates a @property
declaration like this?
@property (nonatomic, retain) MyObject *object;
The retain
property attribute means strong
under ARC.
4.1.1. Property declarations
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With