reactivemongo.api.bson.TypeNaming
See theTypeNaming companion object Naming strategy, to map each class to a discriminator value.
import reactivemongo.api.bson.{ MacroConfiguration, TypeNaming }
val cfg1 = MacroConfiguration(typeNaming = TypeNaming.FullName)
val cfg2 = MacroConfiguration(typeNaming = TypeNaming.FullName)
val cfg3 = MacroConfiguration(
typeNaming = TypeNaming { (cls: Class[_]) =>
"_" + cls.getSimpleName
})
Attributes
- See also:
- Companion:
- object
- Graph
- Supertypes
class Object
trait Matchable
class Any
- Known subtypes
Members list
Concise view
Value members
Returns the name for the given type.
Returns the name for the given type.
import scala.reflect.ClassTag
import reactivemongo.api.bson.TypeNaming
def foo[T](n: TypeNaming)(implicit ct: ClassTag[T]): String =
n(ct.runtimeClass)
Attributes
Composes the naming with the given function f
,
applied on the first result.
Composes the naming with the given function f
,
applied on the first result.
import reactivemongo.api.bson.TypeNaming
val tpeNaming: TypeNaming =
TypeNaming.SimpleName.andThen(_.toLowerCase)
Attributes
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns:
a string representation of the object.
- Definition Classes
- Inherited from:
- Function1