我正在尝试使用具有值类的房间实体:
@JvmInline
value class UserToken(val token: String)
和实体:
@Entity(tableName = TABLE_AUTH_TOKEN)
data class TokenEntity(
@PrimaryKey val id: Int = 0,
val token: UserToken
)
我收到以下错误:
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 TokenEntity {
^
甚至可以使用价值等级的房间吗?我找不到任何关于此的内容。谢谢