How to use sortDescriptor for an attribute on a to many relationship
问题 I have a Song Entity and a Playlist Entity. Playlist can have multiple Songs and Songs can be linked to multiple Playlist. I have a ListToSongs Entity which maintains the order in which Songs were added to the Playlist. I am not using "Ordered Relationship" in ios5 (I am aware of its existence and I need more control over my model) and I store the order by a "sortOrder" field in PlayListToSong entity. So the schema is modeled as (relationship names are written in parentheses below): Song