Hello folks, happy Friday. Question: is it possibl...
# android
c
Hello folks, happy Friday. Question: is it possible for a Room db entity to have a field that is a
value class
? For example:
Copy code
@Entity
data class Order(id: OrderId)

@JvmInline
value class OrderId(val value: String)
When I do this, I get an error at build time:
Copy code
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).
Another error says:
Copy code
Cannot find getter for field.
I am using Room v2.3.0 Thanks for any help! Slack Conversation
c
Ok thanks for the info!