title: CoreData using NSBatchInsertRequest
body: <p>I'm trying to insert Array of dictionary in <code>CoreData</code> using <code>NSBatchInsertRequest</code> according WWDC 2019 (<a href="https://developer.apple.com/videos/play/wwdc2019/230/" rel="nofollow noreferrer">https://developer.apple.com/videos/play/wwdc2019/230/</a>). The insertResult is nil, and my CoreData is empty.</p>
  
  <pre><code>let modelURL = Bundle.main.url(forResource: "CoreDataPerformance", withExtension: "momd")!
  let model = NSManagedObjectModel(contentsOf: modelURL)!
  let container = NSPersistentCloudKitContainer(name: "CoreDataPerformance", managedObjectModel: model)
  container.loadPersistentStores(completionHandler: { (storeDescription, error) in
      if let error = error as NSError? {
          fatalError("Unresolved error \(error), \(error.userInfo)")
      }
  })
  
  try container.viewContext.setQueryGenerationFrom(.current)
  
  let moc = container.viewContext
  moc.automaticallyMergesChangesFromParent = true
  moc.perform {
      let insertRequest = NSBatchInsertRequest(entity: Client.entity(), objects: clients)
      let insertResult = try? moc.execute(insertRequest) as? NSBatchInsertRequest
      let success = insertResult?.resultType
      print("RESULT STATUS: \(success)")
  }
  </code></pre>
  
  <p>This is the error I receive in the console: </p>
  
  <pre><code>2020-02-04 18:30:25.800705+0200 CoreDataPerformance[62836:778869] [error] warning: Multiple NSEntityDescriptions claim the NSManagedObject subclass 'CoreDataPerformance.Client' so +entity is unable to disambiguate.
  
  CoreData: warning: Multiple NSEntityDescriptions claim the NSManagedObject subclass 'CoreDataPerformance.Client' so +entity is unable to disambiguate.
  
  2020-02-04 18:30:25.800846+0200 CoreDataPerformance[62836:778869] [error] warning:   'Client' (0x600000c50bb0) from NSManagedObjectModel (0x600001877480) claims 'CoreDataPerformance.Client'.
  
  CoreData: warning:   'Client' (0x600000c50bb0) from NSManagedObjectModel (0x600001877480) claims 'CoreDataPerformance.Client'.
  
  2020-02-04 18:30:25.800940+0200 CoreDataPerformance[62836:778869] [error] warning:   'Client' (0x600000c589a0) from NSManagedObjectModel (0x600001861680) claims 'CoreDataPerformance.Client'.
  
  CoreData: warning:   'Client' (0x600000c589a0) from NSManagedObjectModel (0x600001861680) claims 'CoreDataPerformance.Client'.
  </code></pre>