Use type parameter A as static type but use pattern matching to handle
different possible subtypes. This makes it easy to persist algebraic
data types(pattern where you have a sealed trait and several implementing
case classes). When writing a case class into BSON its dynamic type
will be pattern matched, when reading from BSON the pattern matching
will be done on the className string. This option extends
reactivemongo.bson.Macros.Options.SaveClassName in to ensure class
names are always serialized.
Types
to use in pattern matching. Listed in a "type list" \/
This member is added by an implicit conversion from UnionType[Types] to
any2stringadd[UnionType[Types]] performed by method any2stringadd in scala.Predef.
This member is added by an implicit conversion from UnionType[Types] to
StringFormat[UnionType[Types]] performed by method StringFormat in scala.Predef.
Use type parameter
A
as static type but use pattern matching to handle different possible subtypes. This makes it easy to persist algebraic data types(pattern where you have a sealed trait and several implementing case classes). When writing a case class into BSON its dynamic type will be pattern matched, when reading from BSON the pattern matching will be done on theclassName
string. This option extends reactivemongo.bson.Macros.Options.SaveClassName in to ensure class names are always serialized.to use in pattern matching. Listed in a "type list" \/