I have a realm model setup like this:
Код: Выделить всё
enum RealmEnumExample: String, Codable, PersistableEnum { case hot, cold, cloudy, rainy } final class RealmExample: Object, ObjectKeyIdentifiable { @Persisted(primaryKey: true) var id: Int @Persisted var weather: RealmEnumExample init(id: Int, weather: RealmEnumExample) { super.init() self.id = id self.weather = weather } override init() { super.init() } } I am confused on when it would be appropriate to resort to "renaming" properties in this scenario and doing a migration block or allowing realm to do the migration if it is handling it as adding and removing properties.
Источник: https://stackoverflow.com/questions/781 ... stableenum
Мобильная версия