Attributes
Members list
Type members
Classlikes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
Value members
Concrete methods
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 methods
Attributes
- Inherited from:
- CodecHelper (hidden)
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)