[英]Implementing RealmModel interface while extending another object
I want to use the new feature of realm-java, where I can just implement RealmModel interface and add @RealmClass annotation to define a table. 我想使用realm-java的新功能,我可以在其中实现RealmModel接口并添加@RealmClass批注以定义表。 Everything works fine, until I try to extend some class. 一切正常,直到我尝试扩展某些课程为止。 I get this error during compile time: 我在编译时收到此错误:
Realm model classes must either extend RealmObject or implement RealmModel to be considered a valid model class
I tried to add the annotation and implement RealmModel on the super class, but no effect. 我试图在超类上添加注释并实现RealmModel,但是没有效果。
Am I missing something ? 我想念什么吗?
It's look like you are trying to make Polymorphism between your Realm's Object. 看起来您正在尝试使Realm的Object之间实现多态。 (if not please add your model) (如果没有,请添加您的模型)
This issue may probably interest you! 这个问题可能会让您感兴趣!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.