Parthiv Mistri
01/17/2020, 7:12 AM@Entity
@TypeConverters(TeamModelTypeConverters::class)
data class User(
@PrimaryKey var id: Int? = null,
var team: List<TeamModel>? = null,
var organization_l1: OrganizationModel? = null,
var organization_l2: OrganizationModel? = null,
)
As you can see I have OrganizationModel
in 2 place. I can not use @Embedded
As it will give me error regarding same field while creating a table.
Can Anyone help me on this?
ThanksMark Murphy
01/17/2020, 12:47 PMprefix
property of the @Embedded
annotation (e.g., @Embedded(prefix = "office_")
). See https://developer.android.com/reference/androidx/room/Embedded for more.