sorting with keypath #383

Closed
ignazioc opened this Issue Jan 12, 2013 · 4 comments

Projects

None yet

2 participants

@ignazioc

This method
[Customer fetchAllSortedBy:sortKey ascending:ascending withPredicate:companyPredicate groupBy:nil delegate:self];
works only for single key, not for keypath.

@jstart
jstart commented Jan 21, 2013

What would your ideal API look like? Would you like to be able to pass in a NSString keypath for fetchAllSortedBy:@"sortObject.keyPath" ?

@ignazioc

Yes, but i think isn't an issue on magicqlrecord, but a limit on nsfetchedresultcontroller.
Here my question on stackoverflow http://stackoverflow.com/questions/14295309/magicalrecord-sorting-using-by-kvc

Inviato da iPad

Il giorno 21/gen/2013, alle ore 07:25, Christopher notifications@github.com ha scritto:

What would your ideal API look like? Would you like to be able to pass in a NSString keypath for fetchAllSortedBy:@"sortObject.keyPath" ?


Reply to this email directly or view it on GitHub.

@jstart
jstart commented Jan 21, 2013

Ah yes, this is a limitation of fetched results controller. You must query a persistent attribute of an NSManagedObject, not a custom method.

This issue should be closed.

@ignazioc

yes, i wil close it

thanks

@ignazioc ignazioc closed this Jan 21, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment