I have 2 NSManagedObjects
, table & field and table has a one-to-many relationship with field i.e.
table <------>> field
Up to now I have been able to loop through field like so:
for (NSManagedObject *field in [table valueForKey:@"fields"]) {
}
however I now need to do this in a specific order using an integer index attribute from the field entity.
I'm new to Core Data so I had assumed that [table valueForKey:@"fields"]
would return an array of NSManagedObject
's but that doesn't seem to be the case.
How can I do this?