https://kotlinlang.org logo
#announcements
Title
# announcements
t

Thiago

12/08/2017, 2:19 PM
Helllo @agrosner I'm having the following error in my project: Error: error: * ========== * class com.raizlabs.android.dbflow.processor.TableValidator: Table Value must provide a visible, default constructor. * ========== * However, I checked the link https://github.com/Raizlabs/DBFlow/issues/1463 that for item 3, you suggest that 'Make sure you provide default values for all fields.' However, all fields in the data class begin with the value null. What would be the solution to this case? Would you help me? Os campos do data class sao : @Column @PrimaryKey(autoincrement = true) var id: Long? = null, @Column var example_value: String? = null, @Column var example_value: String? = null, @Column var example_value: String? = null, @Column var example_value: Int? = null, @Column var example_value: String? = null, @Column var example_values: String? = null, @Column @SerializedName("active") var isActive: Boolean? = null, @Column @Transient var example_value: Int? = null, @Expose var example_value: List<example_value>? = null)
stackoverflow 2
a

agrosner

12/08/2017, 2:24 PM
can you fix your code file. its missing full class definiiton
t

Thiago

12/08/2017, 2:28 PM
this is just a part of the example file intended for the fields ... On reading, I understood that there is something to do with default values of the fields. I believe that the solution mentioned goes through this detail. Right?
a

agrosner

12/08/2017, 2:29 PM
if you could put the class file as you intended and surround with triple tick ``` I can help. you must provide default values for the constructor since we currently use only the default constructor
probably should ask this somewhere else like android-united db-persistence channel or stackoverflow
t

Thiago

12/08/2017, 2:38 PM
ok
k

karelpeeters

12/08/2017, 2:57 PM
Also, please post long code like this in an actual snippet, click the at the bottom right.
l

louiscad

12/08/2017, 3:41 PM
@Thiago Also, please edit your message now that you posted a proper snippet
t

Thiago

12/08/2017, 5:22 PM
It's already edited
🤔 1
2 Views