Model inheritance


#1

I read at documentation that Model Inheritance is not fully available in Realm; at least two important features (in my opinion) - for those that prefer not to MacGyver their models and kill some principles of object oriented - are not possible in Realm: (i) casting between polymorphic classes; (ii) polymorphic containers (List and Results).

I also read that “adding this functionality to Realm is on the road”, but when we click over the link available on the documentation, Realm Team is trying that since 2014, and did not find a way to make it work properly.

My question is: when this functionality will be available with no work arounds?


#2

Hi
It surely seems odd that we have had that feature on the wish list for that long. The way we prioritize is however always going to be dynamic and forward looking and not based on the duration we have had an idea or feature request. The simple answer is that we always try to implement the features that gives the highest value to the majority of our users. And we usually prioritize features that has no workaround over features that has one.
That said we are fully aligned that inheritance would be useful to have, and in a strict SDK priority I would argue it’s in the top-5 list of major features to implement. Lately we have however been very focused on making the best syncing functionality on the planet, and while I can’t promise anything on the timeline, I can say it won’t come this year, but I wouldn’t be surprised if we finally get it made sometime next year. In the meantime we have to make do with composition.