Closed es0329 closed 6 years ago
There's nothing to do with the library. To implement type converters for every data model is terrible but the only solution.
I opened the issue to see if it help.
At the time of our inquiry, I moved forward by separating DTO and DAO. Now, @Ignore superclass fields released in Room v2.1.0-alpha01, looks a lot like what we requested. Not certain though, it may require subclassing Room's @Entity
.
Separate models was appropriate for my case but I wanted to update our issue for future reference.
Room attempts to match a model's fields with valid SQLite data types. It will also disregard fields with an
@Ignore
annotation. Otherwise, a type converter must be supplied where type affinity cannot be made by the compiler.My models subclass
Resource
andResourceIdentifier
in turn. I think without annotations or a type converter, those super class fields might trigger the following at compile time:I'm not certain of the issue so I continue trying to understand it but I wanted to share the issue.