I have a 1-to-many relationship in the Basic Data column, and I'm trying to understand the difference between using the CoreDataGeneratedAccessors method and the simple purpose of changing relationships. For example, the Master Data Programming Guide has an example department and employee. In this example, they use CoreDataGeneratedAccessors to hire and fire employees:
[aDepartment addEmployeesObject:newEmployee]
[aDepartment removeEmployeesObject:firedEmployee]
They do not define feedback, but they say that the “department” is the feedback from the “employees”. Should the following do the same thing?
newEmployee.department = aDepartment
firedEmployee.department = nil;
According to the section “Linking Object Relationships and Integrity” in the Master Data Programming Guide, later examples should automatically record all relationships to maintain the graph. If so, is there a reason to use CoreDataGeneratedAccessors when there is feedback? Does using CoreDataGeneratedAccessors use graph consistency in feedbacks?
source
share