I had this error too. Turned out that I was missing one of my models in my ModelConfiguration's schema. Once I added the missing model to the schema, error went away.
let schema = Schema([Person.self, Car.self, City.self])
let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false)
I see the same issue. I have a handful of @Model classes with string arrays; they each produce this error consistently, whether the property is optional or not.
@Model
class Monster: Decodable, {
var something: [String] = []
var somethingElse: [String]? = nil
}
I had this error too. Turned out that I was missing one of my models in my ModelConfiguration's schema. Once I added the missing model to the schema, error went away.
let schema = Schema([Person.self, Car.self, City.self])
let modelConfiguration = ModelConfiguration(schema: schema, isStoredInMemoryOnly: false)
I see the same issue. I have a handful of @Model classes with string arrays; they each produce this error consistently, whether the property is optional or not.
@Model
class Monster: Decodable, {
var something: [String] = []
var somethingElse: [String]? = nil
}