ios - Getting unique value from core data -
i have 2 entities: schedule , user. schedule has relationship students, many 1 user (with inverse of studentschedule).
i have required schedule objects in array called results, want unique users students relationship.
i using:
nslog(@"%@", [results valueforkeypath:@"students"]); but not getting correct result think due to many relation. have idea this?
you want use collectionoperators.
nslog(@"%@", [results valueforkeypath:@"@distinctunionofobjects.students"]);
Comments
Post a Comment