What are CoreDataGeneratedAccessors?

core-data, ios, objective-c

Solution

You do not have to implement those methods, but you can. In the case you don't, CoreData will generate them dynamically for you.

If you want override the default implementation please read the Core Data Programming Guide (Custom To-Many Relationship Accessor Methods) to find a sample implementation.

A reason to override might be to trigger additional calculations or updates before or after new `Cirqit` objects being added or removed. But be aware of not to change the sample implementation code, just add your custom code - otherwise you might break your relationships handling.

Problem

When I created a CoreData object with a one-to-many relationships, I get some methods `(CoreDataGeneratedAccessors)`. Do we need to implement these methods? The methods generated automatically are given below : ``` - (void)addCirqitsObject:(Cirqit *)value; - (void)removeCirqitsObject:(Cirqit *)value; - (void)addCirqits:(NSSet *)value; - (void)removeCirqits:(NSSet *)value; ```

Original source

Related problems