for example, I have a managed object save in coredata like
@interface team : NSManagedObject
@property(nonatomic)NSNumber* teamID;
@end
I have successfully saved some teams with unique teamID in coredata, now I want to get the team with the max teamID, how do I do this?
I used to get all teams and sort them, but this would bring large overhead to make the fetched array, any better idea?