What is the correct way to parcelize(maybe using @Parcelize) a data class annotated with @Entity from Android’s Room.
Straight forward implementation results in build failure with following message as shown in the screen shot:
Sample Code i used:
@SuppressLint("ParcelCreator")
@Parcelize
@Entity(tableName = "foo")
data class Foo(@PrimaryKey @ColumnInfo(name = "foobar1") val foobar1: Int,
@ColumnInfo(name = "foobar2") val foobar2: Int) : Parcelable {
// Parcelable's impl
}