我正在使用 Mogenerator 生成我的模型。所以在我的人类模型中,我有
- (id)copyWithZone:(NSZone *)zone
{
AppointmentGrid *appointmentGridCopy = [[[self class] allocWithZone:zone] init];
[appointmentGridCopy setEmployeeId:self.employeeId];
[appointmentGridCopy setEmployeeObject:self.employeeObject];
[appointmentGridCopy setServiceId:self.serviceId];
[appointmentGridCopy setServiceObject:self.serviceObject];
[appointmentGridCopy setStartTimestamp:self.startTimestamp];
[appointmentGridCopy setEndTimestamp:self.endTimestamp];
[appointmentGridCopy setAppointmentGridSlots:self.appointmentGridSlots];
return appointmentGridCopy;
}
由于 Machine 类具有所有属性,因此我没有将它们读入 Human 文件。但是我收到一个错误
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[AppointmentGrid setEmployeeId:]: unrecognized selector sent to instance
我真的需要重新定义 Human 文件中的所有内容吗?