title: NSOrderedSet and SwiftUI ForEach
body: <p>I am trying to work with CoreData and SwiftUI and have two entities; Dog and Walk.
  It is a one-to-many relationship between Dog</p>
  
  <pre><code>public class Dog: NSManagedObject, Identifiable {
    @NSManaged public var name: String?
    @NSManaged public var walks: NSOrderedSet?
  }
  </code></pre>
  
  <p>and  Walk</p>
  
  <pre><code>public class Walk: NSManagedObject, Identifiable {
    @NSManaged public var date: Date?
    @NSManaged public var dog: Dog? 
  }
  </code></pre>
  
  <p>The problem I am having is displaying all of the walks for a selected dog in a List.  The following WalksView will display all current walks </p>
  
  <pre><code>struct WalksView: View {
  @ObservedObject var dogWalksVM:DogWalkVM
  var selectedIndex:Int
  var body: some View {
      let currentDog = dogWalksVM.dogs[selectedIndex]
      return  List {
          if currentDog.walks == nil {
              EmptyView()
          } else {
              ForEach(0..&lt;currentDog.walks!.count) { index in
                  Text("Date \(self.walkDate(currentDog.walks![index] as! Walk))")
              }
          }
      }
      .navigationBarTitle(Text("Walks for \(dogWalksVM.dogs[selectedIndex].name ?? "")"), displayMode: .inline)
          .navigationBarItems(trailing: Button(action: {
              self.addWalk(for: currentDog)
          }, label: {
              Image(systemName: "plus")
          }))
  
  }
  
  func walkDate(_ walk:Walk) -&gt; String{
      let dateFormatter = DateFormatter()
      dateFormatter.dateStyle = .medium
      guard let walkDate = walk.date as Date?  else { return ""}
      return dateFormatter.string(from: walkDate)
  
  }
  
  func addWalk(for currentDog:Dog) {
      self.dogWalksVM.addWalk(for: currentDog)
  
  }
  }
  </code></pre>
  
  <p>but when I add a new one, the app crashes with the following error:</p>
  
  <pre><code> ForEach&lt;Range&lt;Int&gt;, Int, Text&gt; count (1) != its initial count (0).
   `ForEach(_:content:)` should only be used for *constant* data.
   Instead conform data to `Identifiable` or use `ForEach(_:id:content:)` and provide an explicit `id`!
  </code></pre>
  
  <p>If I try to do a ForEach on the walks like this:</p>
  
  <pre><code> ForEach(Array(currentDog.walks!),id: \.self) { walk in
                  Text("Date \(self.walkDate(walk))")
              }
  </code></pre>
  
  <p>I am told </p>
  
  <pre><code>Protocol type 'NSOrderedSet.Element' (aka 'Any') cannot conform to 'Hashable' because only concrete types can conform to protocols
  </code></pre>