我有以下型号
class Area: Object {
// Specify properties to ignore (Realm won't persist these)
// override static func ignoredProperties() -> [String] {
// return []
// }
dynamic var id = 0
dynamic var name = ""
override static func primaryKey() -> String? {
return "id"
}
}
class Region: Object {
// Specify properties to ignore (Realm won't persist these)
// override static func ignoredProperties() -> [String] {
// return []
// }
dynamic var id = 0
dynamic var name = ""
override static func primaryKey() -> String? {
return "id"
}
}
我想添加let areas = List<Area>()
到Region类和dynamic var region: Region?
Area类,请问如何执行迁移块?因为迁移文档中的示例只是演示原始类型。