I’m trying to test sequential migrations and the migrations appear to work, but the app is giving me a warning Multiple NSEntityDescriptions claim the NSManagedObject subclass ‘UnCloudNotes.Note’ so +entity is unable to disambiguate.
The app then crashes when it tries to set up the fetched results controller in NotesListViewController (the sort descriptor is not set up as a result of the above warning):
fileprivate lazy var notes: NSFetchedResultsController = {
let context = self.stack.managedContext
let request = Note.fetchRequest() as! NSFetchRequest
request.sortDescriptors = [NSSortDescriptor(key: #keyPath(Note.dateCreated), ascending: false)]
let notes = NSFetchedResultsController(fetchRequest: request, managedObjectContext: context, sectionNameKeyPath: nil, cacheName: nil)
notes.delegate = self
return notes
}()
I’ve followed everything line by line so I don’t know why this error is appearing.