Chapter 2 v3.1 - Unable to load class named 'Bow_Ties.Bowtie' for entity 'Bowtie'

hi every one,

in my AppDelegate I got in this code with message “thread 1 bad SIGABRT”

// Save test bow tie
    let bowtie = NSEntityDescription.insertNewObject(forEntityName: "Bowtie", into: self.persistentContainer.viewContext) as! Bowtie
    bowtie.name = "My bow tie"
    bowtie.lastWorn = NSDate()

and at runtime I got the on console

CoreData: warning: Unable to load class named 'Bow_Ties.Bowtie' for entity 'Bowtie'.  Class not found, using default NSManagedObject instead.
Could not cast value of type 'NSManagedObject_Bowtie_' (0x6080002462a0) to 'Bow_Ties.Bowtie' (0x101440988).
(lldb)

RESOLVED

had to erase classes created from previous entity, created while “current product module” was empty for entity Bowtie and created alla again

In BowTies.xcdatamodeld entity Bowtie Data Model Inspector besides Name - Bowtie,
Parent Entity - No Parent Entity, Class name - Bowtie change Module to Current Product Module

That is working for me but why I don’t have idea!