I have a many to many relationship in CoreData.
Teams has team info and is linked to Schedule which has meet info. A team can have many conferences and a meet has multiple teams attending.
CoreData generated NSManagedObject Sub-classes like this:
//
// ScheduleDetails.h
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@class SchoolRecords;
@interface ScheduleDetails : NSManagedObject
@property (nonatomic, retain) NSString * meetCity;
@property (nonatomic, retain) NSSet *whatTeams;
@end
@interface ScheduleDetails (CoreDataGeneratedAccessors)
- (void)addWhatTeamsObject:(SchoolRecords *)value;
- (void)removeWhatTeamsObject:(SchoolRecords *)value;
- (void)addWhatTeams:(NSSet *)values;
- (void)removeWhatTeams:(NSSet *)values;
@end
I create an instance of SchoolRecords* in category class of SchoolRecords and try to call:
[ScheduleDetail addWhatTeamsObject:thisSchool].
But get the compile error:
No known class method for selector 'addWhatTeamsObject:'
I am importing ScheduleDetails.h
Apple's instructions say I am supposed to add an @dynamic addWhatTeamsObject (I presume), but I cannot figure out where to implement that.
When I try to implement the @dynamic attribute, I simply get two compile errors.
I also tried implementing addWhatTeamsObject in a TableViewController where a method returns an instance of a SchoolRecords*. I get the same error.
I can add more detail if that would be helpful. I have looked around for an example of how these relationships can be established but am coming up blank.
Thanks for your help.