Tomas Kormanak
09/15/2021, 3:23 PMdata class Comment(val title: String val note: String, author_id: Int)
And I the form contains only title and note, when I call form,getData()
I get an error saying author_id
is required.Tomas Kormanak
09/15/2021, 3:24 PMRobert Jaros
09/15/2021, 6:03 PMauthor_id
? It would probably work if you have default value for it.Tomas Kormanak
09/15/2021, 6:25 PMTomas Kormanak
09/15/2021, 6:28 PMRobert Jaros
09/15/2021, 7:31 PMsetData
is not stored anywhere. setData
just copies values for the items added to the form. setData
is optional. You can only use getData
and there must be a way to create an instance of the model class.Robert Jaros
09/15/2021, 7:34 PMRobert Jaros
09/15/2021, 7:34 PMRobert Jaros
09/21/2021, 11:39 AM