I have a fetched results controller that should display all items of a certain entity that has a number of subentities.
The sections in the fetched results controller should be based on the entity name, i.e which subentity an item belongs to. Setting the sectionNameKeyPath
to @"entity.name"
works.
It seems, however, to be impossible to get the right sort descriptor for the fetch request. Things like [NSSortDescriptor sortDescriptorWithKey:@"entity.name" ascending:YES]
result in errors like keypath entity.name not found in entity Something
.