reactivemongo.api.bson.Macros.Annotations
Indicates that if an Option property is empty, it will be represented by BSONNull rather than being omitted.
Option
BSONNull
import reactivemongo.api.bson.Macros.Annotations.NoneAsNull case class Foo( title: String, @NoneAsNull description: Option[String])
Indicates that if an
Option
property is empty, it will be represented byBSONNull
rather than being omitted.