(sorry about the long title)
I have a custom object Person, which in turn has an NSSet
which has several custom objects called Appointment. A Person therefore can have several appointments. Appointment has the values startTime and endTime.
These are Core Data NSMangagedObject
classes.
@interface Person : NSManagedObject
@property (nonatomic, retain) NSString *personName;
@property (nonatomic, retain) NSSet *appointments;
// etc
@end
@interface Appointment : NSManagedObject
@property (nonatomic, retain) NSNumber * startSecond;
@property (nonatomic, retain) NSNumber * endSecond;
// etc
@end
How would I get a list of Persons, in order of the earliest startSecond within any of their appointments?