How can I sort by a transformable attribute in an NSFetchedResultsController?

Posted by Mike Laurence on Stack Overflow See other posts from Stack Overflow or by Mike Laurence
Published on 2010-03-08T23:01:17Z Indexed on 2010/03/08 23:06 UTC
Read the original article Hit count: 421

I'm using NSValueTransformers to encrypt attributes (strings, dates, etc.) in my Core Data model, but I'm pretty sure it's interfering with the sorting in my NSFetchedResultsController.

Does anyone know if there's a way to get around this? I suppose it depends on how the sort is performed; if it's always only performed directly on the database, then I'm probably out of luck. If it sorts on the objects themselves, then perhaps there's a way to activate the transformation before the sort occurs.

I'm guessing it's directly on the database, though, since the sort would be key in grabbing subsets of the collection, which is the main benefit of NSFetchedResultsController anyway.

© Stack Overflow or respective owner

Related posts about core-data

Related posts about cocoa