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

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -