Composition in Realm
Issue #13 There is time we have models that have some kind of inheritance, like Dog, Cat, Mouse can be Animal. We can use composition to imitate inheritance, we just need to make sure it has unique primary key Cat and Dog These are pretty much basic Realm objects class Dog: Object { dynamic var id: Int = 0 required convenience init(json: [String: Any]) { self.init() id <- json.integer(key: "id") } } class Cat: Object { dynamic var id: Int = 0 required convenience init(json: [String: Any]) { self....