Kotlin Android Room Composite primary key many to many relation
I have got two tables: equipment and location. Equipment table has composite primary key consisted of columns "component_id", "id". Location table has primary key "id".
Could you show me the way how to create many to many relationship in room with composite key?
@Entity(
tableName = "equipment", primaryKeys = ["component_id", "id"],
)
data class EquipmentModel(
@ColumnInfo(name = "component_id") val componentId: Int,
@ColumnInfo(name = "id") val id: Int,
@ColumnInfo(name =...