title: CoreData maintain relationship order
body: <p>I have a fairly simple CoreData model expressed as:</p>
  
  <p><img src="https://i.stack.imgur.com/a82t9.png" alt="enter image description here"></p>
  
  <p>There are a number of "Trips" that can contain multiple images. Additionally, a single image can be in multiple trips. </p>
  
  <p>My issue is I want to maintain the order in which they were added to a Trip. Normally, I would add a field to the <code>ImageData</code> object that maintains its <code>index</code>. However, because an Image can be in any number of Trips this doesn't make sense.</p>
  
  <p>What is a clean way to maintaining an index in this case?</p>