Hello everyone,
When I run the code below. The log print:
> class scala.collection.mutable.ListBuffer does not contain a setter for field
> scala$collection$mutable$ListBuffer$$start
> Class class scala.collection.mutable.ListBuffer cannot be used as a POJO type
> because not all fields are valid POJO fields, and must be processed as
> GenericType.
Code:
private lazy val schoolDescriptor = new
ListStateDescriptor[School]("schoolDescriptor", classOf[School])
context.globalState.getListSate(schoolDescriptor).update(ListBuffer(new
School))
Class define:
class School {
var classes: ListBuffer[Class] = ListBuffer()
}
class Class {
var students: ListBuffer[Class] = ListBuffer()
}
class Student {
var name = “”
}
What should I do if POJO has ListBuffer type field, and the element of
ListBuffer also has ListBuffer type field?
https://stackoverflow.com/q/59352295/4388077
Best regards
Utopia