Is it possible to use both Room persistence library's @Entity
with AutoValue's @AutoValue
and builder on the same POJO? How should i do it?
The Room persistence library provides an abstraction layer over SQLite to allow fluent database access while harnessing the full power of SQLite. In particular, Room provides the following benefits: Compile-time verification of SQL queries.
room. Kotlin |Java. Room is a Database Object Mapping library that makes it easy to access database on Android applications. Rather than hiding the details of SQLite, Room tries to embrace them by providing convenient APIs to query the database and also verify such queries at compile time.
This feature will be available in Room 2.1.0 https://issuetracker.google.com/issues/62408420#comment27
AFAIK, as of 1.0.0-alpha3
, this is not possible. Room wants fields; AutoValue doesn't expose fields. Keep tabs on this feature request for progress in this area.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With