Goal: Add a way to ignore BSON serialization of a case class field.
Context**: We don't want to store into MongoDB some case class fields (eg. computed from other sources or used for binary serialization). But we don't want (sometimes we can't) wrap them into Option (eg. to avoid things like Option[Seq[T]]).
I saw Java Driver has a BsonIgnore annotation, could it be possible to implement it ? It can cause issues for types that have no default constructor or default value but it could be prerequisite ?
For example
case class Picture( height: Int, width: Int, @BsonIgnore metadata: Seq[Metadata] = Seq.empty )