I am in the process of moving from Realm to ObjectBox and am working on updating my model classes. I have several instances where the Realm model class uses RealmList<Double> or RealmList<Long> for recording lists of values. The RealmList is a resizable container that implements List so it works well for storing data of unknown sizes. The ObjectBox documentation states that it supports arrays such as double[] and long[]. It also states that it supports List<String> which suggests that it might support a List<> of other types but it's not explicitly stated.
Does ObjectBox support List<Double> and List<Long>? I can work with double[] and long[] if necessary but being able to work with a sizable container would make the transition easier.
I am using ObjectBox version 4.0.3 on Android and Java.
I have not yet tried using List<Double> or List<Long>. I was just hoping for a quick answer on the supported data types.
ObjectBox, as you said, currently only supports List<String>
.
If your project needs query conditions that work on elements use double and long arrays. If that's not an issue, you can create a converter that maps double and long lists to a supported type, like a String, using a converter.
Source and more details: https://docs.objectbox.io/advanced/custom-types