Re: NSFetchedResultsController sort on synthesized property?

2014-03-16 Thread Mike Abdullah
On 27 Feb 2014, at 21:20, Rick Mann rm...@latencyzero.com wrote: Thanks, Sixten. I had hoped that if it couldn't translate a sort descriptor in to SQL, that it would apply it after fetching. The problem with doing that is it would require faulting all the objects into memory at once, which

Re: NSFetchedResultsController sort on synthesized property?

2014-03-16 Thread Rick Mann
It would only need to load the sort attributes. Maybe using keyPathsForValuesAffectingKey or some such. Sent from my iPhone On Mar 16, 2014, at 12:55, Mike Abdullah mabdul...@karelia.com wrote: On 27 Feb 2014, at 21:20, Rick Mann rm...@latencyzero.com wrote: Thanks, Sixten. I had hoped

Re: NSFetchedResultsController sort on synthesized property?

2014-02-27 Thread Sixten Otto
The fetched results controller needs to be able to do its sorting in the database (assuming a SQLite store). The section keypath itself doesn't necessarily need to be a persistent property, as long as its values match the ordering of the sort descriptors. (For instance: a table that sections the

Re: NSFetchedResultsController sort on synthesized property?

2014-02-27 Thread Rick Mann
Thanks, Sixten. I had hoped that if it couldn't translate a sort descriptor in to SQL, that it would apply it after fetching. On Feb 27, 2014, at 06:14 , Sixten Otto hims...@sfko.com wrote: The fetched results controller needs to be able to do its sorting in the database (assuming a SQLite

NSFetchedResultsController sort on synthesized property?

2014-02-26 Thread Rick Mann
It seems that I can't sort on a read-only synthesized property in my NSManagedObject subclass. I'd like to sort a bunch of stuff into some sections, but the definition of a section is somewhat complex, depending on multiple other properties. So, I defined a property section like this: -