Thread Error with @Model Class

I have a @Model class that is comprised of a String and a custom Enum. It was working until I added raw String values for the enum cases, and afterwards this error and code displays when opening a view that uses the class:

{
    @storageRestrictions(accesses: _$backingData, initializes: _type)
    init(initialValue) {
        _$backingData.setValue(forKey: \.type, to: initialValue)
        _type = _SwiftDataNoType()
    }
    get {
        _$observationRegistrar.access(self, keyPath: \.type)
        return self.getValue(forKey: \.type)
    }
    set {
        _$observationRegistrar.withMutation(of: self, keyPath: \.type) {
            self.setValue(forKey: \.type, to: newValue)
        }
    }
}

Thread 1: EXC_BREAKPOINT (code=1, subcode=0x1cc165d0c)

I removed the String raw values but the error persists. Any guidance would be greatly appreciated. Below is replicated code:

@Model
class CopingSkillEntry {
    var stringText: String
    var case: CaseType
    
    init(stringText: String, case: CaseType) {
        self.stringText = stringText
        self.case = case
    }
}


enum CaseType: Codable, Hashable {
    case case1
    case case1
    case case3
}

Try to remove the database file so that SwiftData can generate a new one.

Hi,

Thanks for your response, however I'm not sure where that file would be located. I don't see a database file in my file directory. All I have is the file with the model class.

Thread Error with @Model Class
 
 
Q