Attributes
Members list
Type members
Inherited classlikes
Attributes
- Inherited from:
- Codecs
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Codecs
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Codecs
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Codecs
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- Codecs
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Inherited methods
Attributes
- Inherited from:
- Codecs
This variant of playFormatCodec allows to register a codec for subclasses, which are defined by a play format for a supertype. This is helpful when writing an instance of the subclass to mongo, since codecs are looked up by reflection, and the format will need to be registered explicitly for the subclass.
This variant of playFormatCodec allows to register a codec for subclasses, which are defined by a play format for a supertype. This is helpful when writing an instance of the subclass to mongo, since codecs are looked up by reflection, and the format will need to be registered explicitly for the subclass.
It makes it easier to register for multiple subclasses together.
E.g.
sealed trait Sum
case class Sum1() extends Sum
case class Sum2() extends Sum
val sumFormat: Format[Sum] = ...
new PlayMongoRepository[Sum](
domainFormat = sumFormat,
extraCodecs = Codecs.playFormatCodecsBuilder(sumFormat).forType[Sum1].forType[Sum2].build
)
Attributes
- Inherited from:
- Codecs
This variant of playFormatCodec allows to register codecs for all direct subclasses, which are defined by a play format for a supertype. This is helpful when writing an instance of the subclass to mongo, since codecs are looked up by reflection, and the format will need to be registered explicitly for the subclass.
This variant of playFormatCodec allows to register codecs for all direct subclasses, which are defined by a play format for a supertype. This is helpful when writing an instance of the subclass to mongo, since codecs are looked up by reflection, and the format will need to be registered explicitly for the subclass.
E.g.
sealed trait Sum
case class Sum1() extends Sum
case class Sum2() extends Sum
val sumFormat: Format[Sum] = ...
new PlayMongoRepository[Sum](
domainFormat = sumFormat,
extraCodecs = Codecs.playFormatSumCodecs(sumFormat)
)
Attributes
- Inherited from:
- CodecHelper (hidden)