In the "old" world we could define a model property as an integer (e.g. "Integer 64") and then have the actual class representing that model define the property as an enum instead and have getters/setters using methods such as primitiveValue(forKey:)
When migrating to use SwiftData I changed the model to be an actual enum type and even though the underlying type of the enum is an integer and therefore supported by the primitive storage it requires me to use Codable
on the enum instead and doing so makes it incompatible with the old CoreData model.
Does anyone have any ideas or workarounds here or do you feel it is a bug and should be reported?
enum FooType: Int64 {
case awesome
case super
}
@Model
final class Note {
var type: FooType // ERROR
}