title: iOS 13, CoreData crash regarding transform property
body: <p>I am trying to load file from Core Data as I did before.
  My CoreData stack as follows:</p>
  
  <pre><code>import Foundation
  import CoreData
  
  class SaveData:NSObject {
  
  
  
  lazy var persistentContainer: NSPersistentContainer = {
      let container = NSPersistentContainer(name: "DataModel")
      container.loadPersistentStores(completionHandler: {
      storeDescription, error in
      if let error = error {
          fatalError("Could load data store: \(error)")     }   })
      return container }()
  
  
  lazy var managedObjectContext: NSManagedObjectContext = persistentContainer.viewContext
  
  }
  </code></pre>
  
  <p>My DataModel:
  <a href="https://i.stack.imgur.com/J1wpU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/J1wpU.png" alt="enter image description here"></a></p>
  
  <p>I have no trouble of saving data when saving function is trigger.  But having trouble of fetching data.
  My fetch method like this:</p>
  
  <pre><code>var saveData = SaveData()
  
  var locations = [Location]()
  
  override func viewDidLoad() {
      super.viewDidLoad()
  
      let fetchRequest = NSFetchRequest&lt;Location&gt;()   // 2
      let entity = Location.entity()
      fetchRequest.entity = entity   // 3
      let sortDescriptor = NSSortDescriptor(key: "date", ascending: true)
      fetchRequest.sortDescriptors = [sortDescriptor]
  
      do {
          locations = try saveData.managedObjectContext.fetch(fetchRequest)
      } catch {
          fatalCoreDataError(error)
      }
  
  }
  </code></pre>
  
  <blockquote>
    <p>When fetching the data from CoreData, app crashes. The debugs area
    says: 2019-10-02 20:44:29.780267+0800 MyLocation[20870:2214196]
    [error] error: No NSEntityDescriptions in any model claim the
    NSManagedObject subclass 'Location' so +entity is confused.  Have you
    loaded your NSManagedObjectModel yet ? CoreData: error: No
    NSEntityDescriptions in any model claim the NSManagedObject subclass
    'Location' so +entity is confused.  Have you loaded your
    NSManagedObjectModel yet ? 2019-10-02 20:44:29.780387+0800
    MyLocation[20870:2214196] [error] error: +[Location entity] Failed to
    find a unique match for an NSEntityDescription to a managed object
    subclass CoreData: error: +[Location entity] Failed to find a unique
    match for an NSEntityDescription to a managed object subclass
    2019-10-02 20:44:29.789644+0800 MyLocation[20870:2214196] ***
    Terminating app due to uncaught exception
    'NSInvalidArgumentException', reason: 'executeFetchRequest:error: A
    fetch request must have an entity.'</p>
  </blockquote>
  
  <p>I have tried the solution I can find, nothing works at the moment.
  How to resolve this issue? Thanks in advance.</p>