My RealmObject/RealmModel 由 Calendar/HashMap/HashSet 组成。我知道 Realm 不支持这些,但是有什么解决方法吗?
而不是Calendar
,请使用Date
from calendar.getTime()
对于HashSet
,请使用RealmList
对于HashMap
,您需要对象内部的键字段,然后使用 realm.where(Value.class).equalTo("keyField", key).findAll()
取回该项目。