# Chapter 2 v3.1 - Unable to load class named 'Bow\_Ties.Bowtie' for entity 'Bowtie'

**URL:** <https://forums.kodeco.com/t/chapter-2-v3-1-unable-to-load-class-named-bow-ties-bowtie-for-entity-bowtie/26193>\
**Category:** Core Data by Tutorials\
**Created:** [February 14, 2017, 12:35pm UTC](https://forums.kodeco.com/t/chapter-2-v3-1-unable-to-load-class-named-bow-ties-bowtie-for-entity-bowtie/26193 "2017-02-14T12:35:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![biggreentree](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/biggreentree/32/105896_2.png) [@biggreentree](https://forums.kodeco.com/u/biggreentree)\
**Post date:** [February 14, 2017, 12:35pm UTC](https://forums.kodeco.com/t/chapter-2-v3-1-unable-to-load-class-named-bow-ties-bowtie-for-entity-bowtie/26193/1 "2017-02-14T12:35:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![mamazur](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mamazur/32/81494_2.png) [@mamazur](https://forums.kodeco.com/u/mamazur)\
**Post date:** [February 15, 2017, 11:29pm UTC](https://forums.kodeco.com/t/chapter-2-v3-1-unable-to-load-class-named-bow-ties-bowtie-for-entity-bowtie/26193/2 "2017-02-15T23:29:00Z")

</div>

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!
