class ReadObject ( var id: Long,
var description: String?,
var relationOf: Int,
var namerelation: String ) {....}
The above works great. On the place of the .... i have some constructor variants and some helper functions.
But when i do this:
class ReadObject ( var id: Long,
var description: String?,
var relationOf: Int,
var namerelation: String ) { private var tester: Int = 0 .... }
i get the message from the title.
of course i am not reading the 'tester' from the database it is an internal helper-var for the object and not a database field.
I seems strange that private vars are not allowed when an object is used to read from the database so i must be doing something wrong. Just cannot figure out what.
There are some other posts about the same error but they describe a different situation.
Hope somebody can help
Found the solution the scientific-way (try and try again)
Adding the @Ignore before the declaration of the private var solves the error.
I do not understand why beceause the private var is not in declaration of the object but sometimes you just need to accept things.