I am using room library and I have below mentioned entity:
@Parcelize
@Entity(tableName = "tb_option")
data class OptionsTable(
var question_id: Int? = null,
var option_id: Int? = null,
var option: String? = null,
var is_selected: Int? = null,
@PrimaryKey(autoGenerate = true)
var sr_no: Int = 0) : Parcelable
as you can see I have all the field declared as var
but it is still showing error as:
error: Cannot find setter for field.
e:
e: private java.lang.Integer is_selected;
e:
^
please suggest some fix for this.
Thanks