是否有可能使用外键连接两个端点结果。
End Point 1 :
{"series":[{"id":2,"name":"My Series","role":"student","student_id":15,"instructor_ids":[13],"sequential":false,"series_id":1,"user_assignment_ids":[3,4]}]}
End Point 2 :
{"Assignments":[{ "id":3,"Name":"Assignment1", "seriesID":2},{ "id":4,"Name":"Assignment1","seriesID":2},{ "id":6,"Name":"Assignment1","seriesID":null}]}
在以上两个端点中,我有外键“user_assignment_ids”。
@class UserAssignment;
@interface UserSeries : NSManagedObject
@property (nonatomic, retain) NSNumber * id;
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSString * role;
@property (nonatomic, retain) NSNumber * sequential;
@property (nonatomic, retain) NSNumber * seriesID;
@property (nonatomic, retain) NSNumber * studentID;
@property (nonatomic, retain) id userAssignmentIDS;
@property (nonatomic, retain) NSSet *userAssignment;
@end
@interface UserSeries (CoreDataGeneratedAccessors)
- (void)addUserAssignmentObject:(UserAssignment *)value;
- (void)removeUserAssignmentObject:(UserAssignment *)value;
- (void)addUserAssignment:(NSSet *)values;
- (void)removeUserAssignment:(NSSet *)values;
@end
@class UserSeries;
@interface UserAssignment : NSManagedObject
@property (nonatomic, retain) NSNumber * assignmentID;
@property (nonatomic, retain) NSString * name;
@property (nonatomic, retain) NSNumber * seriesID;
@property (nonatomic, retain) UserSeries *userSeries;
@end
谁能告诉我使用外键进行两个端点连接的可能方法?