im working with realm in android and im getting this error message: error: Field "items" of type "java.util.List" is not supported.
it's at this line:
private List<Item> items;
here is the class:
public class Article extends RealmObject implements Serializable{
@PrimaryKey
private String category;
private List<Item> items;
public String getCategory() {
return category;
}
public void setCategory(String category) {
this.category = category;
}
public List<Item> getItems() {
return items;
}
public void setItems(List<Item> items) {
this.items = items;
}
}
can anybody help me?
Unfortunately RealmDatabase doesn’t support
List<>
. But you can achieve the same result by Using RealmList
:)
Realm supports subclasses of RealmObject and RealmList to model relationships.
From: https://realm.io/docs/java/latest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With