To-Many relationships in Core Data are represented by NSSet (as automatically generated by using the Editor... Create NSManagedObject Subclass.. menu.
Which is the most efficient way to iterate an NSSet* ?
NSSet* groups = [contact groups];
for(Group* group in groups) {
NSString* groupName = [group name];
}
or
NSSet* groups2 = [contact groups];
NSArray* groupsArray = [groups2 allObjects];
for(Group* group in groupsArray) {
NSString* groupName = [group name];
}
or another way?