I am new to Realm for Android, so I'm not sure if I am approaching this correctly. I have a class that looks like this:
public class Entry extends RealmObject implements Parcelable { ... }
The problem is that the Parcelable
interface contains methods such as describeContents()
writeToParcel()
, and RealmObjects should not have methods other than getters and seters:
Error:(81, 17) error: Only getters and setters should be defined in model classes
So my question is: how can I combine these two teams? Is there a better way than creating a separate class (maybe something like RealmEntry
)? This will lead to a lot of duplicate code ...
source share