I have an issue when updating to Room 2.4.0-rc01 on fields annotated with @ForeignKey. This version adds an empty @Target in its definition making it impossible to target properties.
@Entity
class Foo {
@PrimaryKey
@ColumnInfo
var id: String = ""
@ForeignKey(entity = Foo::class, parentColumns = ["bar_id"], childColumns = ["bar"])
@ColumnInfo
var bar: String? = null
}
@Entity
class Bar {
@PrimaryKey
@ColumnInfo
var bar_id: String = ""
}
I have the following error at the @ForeignKey annotation: This annotation is not applicable to target 'member property with backing field'