I'm having an Entity class Damage
@Entity
class Damage(
@PrimaryKey(autoGenerate = true)
var damageId: Int,
var position: String,
var place: DamageItem? = null,
var cause: DamageItem? = null
)
DamageItem is a regular POJO
data class DamageItem(
var itemId: String,
var itemDesc: String)
While trying to compile this code it is showing an error that
Cannot figure out how to save this field into database. You can consider adding a type converter for it.
I thought of first using @Embedded param for place and cause but found that is not the solution.
Is there anyway to solve this?