1
关于创建相互继承的领域对象只是一个简单的问题。继承RLMObject
@interface BaseObject : RLMObject
@property long commonProp1;
@property long commonProp2;
@property long commonProp3;
@end
@interface InheritingObject : BaseObject
@property NSString *name;
@end
@interface SecondInheritingObject : BaseObject
@property NSString *name2;
@end
因此,BaseObject有一些属性,每个InheritingObject继承。这两个继承类是我想要在数据库中出现的唯一类。
有没有什么好方法可以避免出现在Realm中的BaseObject?