A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/realm/realm-swift/issues/1109 below:

Abstract Class / Polymorphism Support · Issue #1109 · realm/realm-swift · GitHub

Does it possible to create smth like this:

Blue - abstract classes. Such model will help me to incapsulate some logic and prevent code duplication.

In this example RLMItem can be associated with RLMCategory or/and RLMFolder. It would be very useful if i will be able to get all RLMFolders and RLMItems using [RLMCatItem allObjects].
Seems that it is not possible.

I've tried to make smth similar with subclasses, but as result - I have additional useless classes in schema.

This works well with CoreData, but can I expect smth like this in Realm?

_In other words:_

  1. Abstract classes will not be displayed in Realm Browser
  2. Ability to query abstract classes (this will include all subclass objects)

lumos-pairstation, yueqianzhang, simonbengtsson, rozd, ivnsch and 15 more


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4