In the following code:
NSFetchedResultsController *frc =
[[NSFetchedResultsController alloc]
initWithFetchRequest:fetchRequest
managedObjectContext:myManagedObjectContext
sectionNameKeyPath:@"store"
cacheName:@"SomeCache"
];
The @"store" value for sectionNameKeyPath actually points to a relationship to a Store entity which has a name attribute that I really need as my section header title.
But the way my code is setup it cannot be accomplished as I instead get section titles like: 0x5b504f0 0x5b51190 Which are code data addresses for the Store object being fetched as far as I can tell.
How can I use NSFetchedResultsController so that I may tell it that I want it to fetch the name attribute of whatever it fetches from sectionNameKeyPath:@"store" ? Or is there some other workaround?
Try sectionNameKeyPath:@"store.name"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With