iphone - Renaming CoreDataGeneratedAccessors -
when create nsmanagedobject subclass entity in xcdatamodel, xcode automatically creates accessors to-many-relationships.
in case, have tag entity has several children.
xcode create these methods:
- (void)addchildrenobject:(tag *)value;
- (void)removechildrenobject:(tag *)value;
- (void)addchildren:(nsset *)value;
- (void)removechildren:(nsset *)value;
however, i'd rename first 2 ones addchildtag: , removechildtag:.
cause problems because coredata classes expect original ones exist? should know not call these methods myself, rather use inverse relationship, to-one-relationship.
i don't think core data behind scenes uses these methods. pretty sure depends more on primitive key-value methods e.g.setvalue:forkey
.
however, there lot of naming convention based functionality in api wrong. suggest creating small test project , see if can break.
Comments
Post a Comment