Is it possible that update only selected columns in ObjectBox Android?
For example, there are 5 columns in "Remind" Entity
@Entity
data class Remind (
@Id var id: Long = 0,
var title: String? = null,
var memo: String? = null,
var ymd: String? = "2021-01-01 FRI"
var done: Int = 0
)
and I want to update only "done" column for existing ID.
So I tried,
private fun putRemind(done: Int, id: Long) {
val newRemind = Remind(done = done, id = id)
ObjectBox.store.boxFor(Remind::class.java).put(newRemind)
}
however, all columns were overwritten (other columns were filled with initial values).
Is there any easy way to overwrite only selected columns? Or always do I have to re-put all the columns?
Thank you.