I'm trying to make a Room entity by using @Ignore to a list but when i try to build the app i get the following error:
Entities and POJOs must have a usable public constructor
Here is how my code looks like:
@Entity(tableName = "prodotti_table")
data class Prodotto(
@PrimaryKey(autoGenerate = false)
var codart: String,
var desc: String,
var prezzo_acq: Float,
var prezzo_vend: Float,
@Ignore var barcode: List<Barcode>,
var qta: Float
)
@Entity(tableName = "barcode_prodotti_table")
data class Barcode(
@PrimaryKey
var id: Int,
var codart: String,
var barcode: String,
var qta: Float
)
How can i solve it still by using the @Ignore in that data class?