Closed jfredsilva closed 6 years ago
@jfredsilva I was finally able to get around to checking this out. Unless I'm mistaken, it seems that ObjectMapper+Realm
already supports ImmutableMappable
:
class User: Object, ImmutableMappable {
dynamic var username: NSString?
var friends: List<User>?
required convenience init(map: Map) throws {
self.init()
}
override class func primaryKey() -> String? {
return "username"
}
func mapping(map: Map) {
username <- map["username"]
friends <- (map["friends"], ListTransform<User>())
}
}
Do you plan on adding support for ImmutableMappable?