Since I updated from Kotlin 1.5.10 to 1.5.20 I am having a build issue due to models.
I am getting : Note: PrimaryKey[childId] is overridden by PrimaryKey[parentId]
My objects are :
@Entity
class Parent : Child() {
@ColumnInfo(name = "parent_id")
@PrimaryKey(autoGenerate = true)
var parentId: Int? = null
@SerializedName("name")
var name: String? = null
...
}
and
@Entity
open class Child(
@ColumnInfo(name = "child_id")
@PrimaryKey(autoGenerate = true)
var childId: Int? = null,
@SerializedName("description")
var description: String? = null
...
) : Serializable {...}
Note that with Kotlin 1.5.10 I have no build issue. I tried to remove the @PrimaryKey of the child but I get another error saying @Entity must have a PrimaryKey
Am I missing something? Thanks for your help