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

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

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