I have a base parent object like this:
class A: Mappable {
var x: String!
...
}
And two children of it:
class Child1: A {
var y: Int!
...
}
class Child2: A {
var z: String?
}
All this is good and dandy, but what happens when I have an object that represents an array of objects that inherit from A such as:
class Wrapper: Mappable {
var objcs: [A]? // A will always be either Child1 or Child2, never A directly
}
How do I manage this situation? (little detail, I need to be able to use Wrapper from Obj-c as well, didn't add the annotations and NSObject inheritance to avoid being verbose)