CamilleBC
06/27/2019, 3:46 PMdata class
duplication when using room.
I have a data class
from a custom library (Kotlin but NOT Android). I have an Android app that uses that library and will store some items of that data class
. But as far as I can see, I don't find an easy way to create an entity
from that library data class
. Any ideas?@Entity
data class DataEntity(val value: Int) {
constructor(data: Data): this(data.value)
}
I hope it's good enough 😛