I have been exploring Room database object mapping library and I figured something weird.
An entity data model cannot have immutable properties, as this answer sugge
I believe that the issue stems from certain fields which can not be constructor parameters. From the Javadoc of the @Relation
annotation:
Note that the
@Relation
annotated field cannot be a constructor parameter, it must be public or have a public setter.
As a workaround, I had a private constructor parameter _myRelationProperty
and a public field:
val myRelationProperty: List get() = _myRelationProperty