title: SwiftUI Preview Core Data with Relationships
body: <p>I'm trying to work with Core Data &amp; SwiftUI's previews and think I'm close but haven't been able to get this to work.</p>
  
  <pre><code>    static var previews: some View {
          let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext
          let newGame = Game.init(context: context)
          newGame.gameName = "Testy Game"
          newGame.gameDescription = "Wooo play the thing"
          newGame.goal = Goal.init(goalName: "Try Harder", goalComplete: false, goalOfGame: newGame)
          return GameGoalsDetail(game: newGame).environment(\.managedObjectContext, context)
      }
  }
  </code></pre>
  
  <p>I'm getting a "Ambiguous reference to member 'init(entity:insertInto:)'" on the newGame.Goal = Goal.init... line.</p>
  
  <p>I'm trying to figure out how to initialize a new Game and then initialize a connected Goal to it right after.</p>
  
  <p>My Core Data Game class takes gameName, gameDescription, and a goal as a NSSet?.
  The Core Data Goal class has goalName, goalComplete, &amp; goalOfGame: Game?. I think my issue is in connecting the two.</p>
  
  <p>Appreciate the help in advance and willing to share more code if requested.</p>