I am using Entity class as model for API response it has List<Address>
field I want it at serialization phase but i want to ignore it from stored in database as it will need TypeConverter and I don't want this.
@Entity(tableName = "USER")
data class User(
@Ignore
@SerializedName("address")
val address: List<Address>?,
@SerializedName("auth_token")
@ColumnInfo(name = "authToken")
val authToken: String?)
I have used @Ignore
but got this error
error: Entities and Pojos must have a usable public constructor. You can have an empty constructor or a constructor whose parameters match the fields (by name and type).
public final class User {
^
Hint: I did not want to store this filed at db