By default when creating NSManagedObject subclass file from data model, Core Data creates properties of type NSString (nonatomic, retain) for string type columns. I might be done due to performance consideration, however, I'm implementing Data Mapper pattern where core data NSManagedObject subclasses are separated from model classes. So when converting model classes to Core data NSManagedObject subclass, retain just assigns a pointer and not a copy. From the architecture point of view, it brakes logic separation between core data access and model classes, so I need to use copy instead of retain.
Is it the only way to do is manually to change properties in NSManagedObject subclasses?
copy
method of a normal (non-mutable)NSString
returns the same instance, so don't freak out your copying property doesn't actually copy anything when you test it. – Monolo