Search code examples
ioscore-datarelationships

App crashes when data for two entities are saved on different classes and passed to other class in core data


Hi I am new to core data and working on relationships for first time.I have two tables i.e.School and Book School and Book has one to many relationship

I am not getting the cause for this exception.Kindly help me to resolve it by giving your suggestions.Thanks in advance.


Solution

  • The reason for crash is this line

    [school setValue:book forKey:@"books"];