I am a noob at core data, so here goes.
I have a core data object, for example student.
The student has mane attributes, like name, age, dob, address, and so on.
Here's a very simple way to iterate over an NSManagedObject:
NSEntityDescription *entity = [myManagedObject entity];
NSDictionary *attributes = [entity attributesByName];
for (NSString *attribute in attributes) {
id value = [myManagedObject valueForKey: attribute];
NSLog(@"attribute %@ = %@", attribute, value);
}
The clues for how to do this (plus lots more) comes from Ole Bergmann's blog: http://oleb.net/blog/2011/05/inspecting-core-data-attributes/