-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Scala
-
None
-
Environment:Ubuntu 16.04
Currently with 2.2.1 and higher, a case class that is registered can denote possible missing fields as Option[field]. Sometimes we have default values on case classes and it would be good if a collection can be read into a case class so the missing fields are replaced by the defaults
for example:
case class Reg (name: String, mark: Int, loc: String, date: Date = new Date())
collection Registration {"name": "David", "mark": 75, "loc": "The Gragg" }
I would like the collection Registration to be read into Reg as
Reg("David", 75, "The Gragg", new Date())