For a sealed family (all implementations of a sealed trait or defined explicit union types), this option enables the automatic materialization of handlers for the member types.
For a sealed family (all implementations of a sealed trait or defined explicit union types), this option enables the automatic materialization of handlers for the member types.
If used, make sure it cannot lead to type recursion issue (disabled by default).
The default options that are implied if invoking "non-Opts" method.
The default options that are implied if invoking "non-Opts" method. All other options extend this.
Same as SaveClassName but using the class simple name (i.e.
Same as SaveClassName but using the class simple name (i.e. Not the fully-qualified name).
Same as UnionType but saving the class’ simple name io.
Same as UnionType but saving the class’ simple name io. the fully-qualified name.
to use in pattern matching. Listed in a "type list" \/
Use type parameter A
as static type but use pattern matching to handle
different possible subtypes.
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.
to use in pattern matching. Listed in a "type list" \/
Print out generated code during compilation.
Type for making type-level lists for UnionType.
Type for making type-level lists for UnionType. If second parameter is another \/ it will be flattend out into a list and so on. Using infix notation makes much more sense since it then looks like a logical disjunction.
Foo \/ Bar \/ Baz
is interpreted as type Foo or type Bar or type Baz
Similar to reactivemongo.bson.Macros.Options.UnionType but finds all implementations of the top trait automatically.
Similar to reactivemongo.bson.Macros.Options.UnionType but finds all implementations of the top trait automatically.
(Since version 0.12-RC2) Default behaviour for sealed trait, if union types are not explicitly defined
In write
method also store class name (dynamic type) as a string
in a property named "className".
In write
method also store class name (dynamic type) as a string
in a property named "className".
(Since version 0.12-RC2) Default behaviour for sealed trait, if union types are not explicitly defined
Same as AllImplementations but saving the simple name (e.g.
Same as AllImplementations but saving the simple name (e.g. the fully-qualified name).
(Since version 0.12-RC2) Default behaviour for sealed trait, if union types are not explicitly defined
Methods with 'Opts' postfix will take additional options in the form of type parameters that will customize behaviour of the macros during compilation.