Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MR_aggregateOperation methods should return id #709

Closed
semireg opened this issue Mar 18, 2014 · 1 comment
Closed

MR_aggregateOperation methods should return id #709

semireg opened this issue Mar 18, 2014 · 1 comment
Assignees
Labels
Milestone

Comments

@semireg
Copy link

semireg commented Mar 18, 2014

This method currently returns an NSNumber, however, it doesn't always... If you have a date property, min: and max: functions will return NSDate objects. Therefore, the return of these should likely be id.

+ (NSNumber *) MR_aggregateOperation:(NSString *)function onAttribute:(NSString *)attributeName withPredicate:(NSPredicate *)predicate inContext:(NSManagedObjectContext *)context 

https://github.com/magicalpanda/MagicalRecord/blob/develop/MagicalRecord/Categories/NSManagedObject/NSManagedObject%2BMagicalAggregation.m#L109

@tonyarnold
Copy link
Contributor

Good point! I'll update it now.

naqi pushed a commit to naqi/MagicalRecord that referenced this issue Apr 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants