title: Core Data: What should I use as a Sort Descriptor with ordered set (ios5) in a many to many relationship
body: <p><img src="https://i.stack.imgur.com/bZEM1.png" alt="enter image description here">- I have an <code>Item</code> Entity and a <code>Tag</code> Entity.
  - Items can have multiple Tags and Tags can be linked to multiple Items (many to many relationship).
  - The relationship is an "Ordered Relationship" (using Ordered relationship in IOS5) both ways.</p>
  
  <p>I want to fetch all child tags for a given item</p>
  
  <p>Im using the following fetch request:</p>
  
  <pre><code>NSFetchRequest* request = [NSFetchRequest fetchRequestWithEntityName:@"Item"];
  
  // Fetch all items that have a given tag
  Tag* myTag = ....;
  request.predicate = [NSPredicate predicateWithFormat:@"ANY tag == %@", myTag];
  
  // This is my attempt to get the correct sort ordering (it crashes)
  NSSortDescriptor *sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:@"tag"
                                                                   ascending:YES];
  request.sortDescriptors = @[sortDescriptor];
  </code></pre>
  
  <p>The above sort descriptor returns data (which I assume is in some order) but then crashes:</p>
  
  <pre><code>[_NSFaultingMutableOrderedSet compare:]: unrecognized selector sent to instance 0x10b058f0
  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 
  '-[_NSFaultingMutableOrderedSet compare:]: unrecognised selector sent to instance 0x10b058f0'
  </code></pre>
  
  <p>If I give an empty sort descriptors array then I dont get a crash but the result is not ordered. </p>
  
  <p>How do I correctly implement the sort descriptor in a many to many relationship using the ordered relationship feature in ios5?</p>