I have an entity called "Client," and each Client can have multiple "Properties." CoreData creates methods on the Client class for me for adding a new Property to the set, but I don't understand the purpose of this. Is there any difference at all between:
Property *newProperty = [NSEntityDescription insertNewObjectForEntityForName:@"Property" inManagedObjectContext:self.managedObjectContext];
newProperty.name = @"[New Property]";
newProperty.client = self.currentClient;
and this:
Property *newProperty = [NSEntityDescription insertNewObjectForEntityForName:@"Property" inManagedObjectContext:self.managedObjectContext];
newProperty.name = @"[New Property]";
[self.currentClient addPropertiesObject:newProperty];
As far as I can tell, both of these do the exact same thing; they just associate my new Property with the correct Client. Is one preferred over the other; is there any difference at all? I just want to make sure that I'm not missing the entire point of the automatically generated "addPropertiesObject" method. Thanks,