-
Notifications
You must be signed in to change notification settings - Fork 244
Open
Description
For some reason, once I update, it complains about that I can't set one of the fields, but I do need to set the field:
@Entity
interface TLThemeResource : Parcelable, Persistable {
@get:Key
@get:Generated
var id: Long
var url: String
var width: Int?
var height: Int?
val format: String?
var deviceFilePath: String?
var type: String
// @get:OneToOne
// val theme: TLTheme
}Usage:
val tlThemeResourceEntity = TLThemeResourceEntity()
tlThemeResourceEntity.id=123L
Gradle:
// https://mvnrepository.com/artifact/io.requery/requery https://github.com/requery/requery
// final def requery_version = "1.6.1" // can't use this for some reason (something with error: Element "id" is read-only but has setter (Kotlin: change var to val))
final def requery_version = "1.5.1"
implementation "io.requery:requery:$requery_version"
implementation "io.requery:requery-kotlin:$requery_version"
implementation "io.requery:requery-android:$requery_version"
// https://mvnrepository.com/artifact/io.requery/requery-processor
kapt "io.requery:requery-processor:$requery_version"
On 1.5.1, it works fine. Once I use 1.6.1, it wants me to change it to val, but then I can't change it.
The error:
C:\Users\User\Desktop\MyApplication3\app\build\tmp\kapt3\stubs\debug\com\example\myapplication\TLThemeResource.java:11: error: Element "id" is read-only but has setter (Kotlin: change var to val)
public abstract long getId();
Attached sample here:
Metadata
Metadata
Assignees
Labels
No labels