Hi I would like to serialize/deserealise to DBObject some map with enumeration as key using salat.
object MyEnum extends Enumeration {
val VAL_ONE, VAL_TWO = Value
}
case class CanBeStored(a:Enumeration.Value)
case class CanNotBeStored(a:Map[Enumeration.Value,Boolean])
// Produces exception[[ClassCastException: com.mongodb.BasicDBObject cannot be cast to scala.collection.immutable.Map]]
As I understood it is not possible using current version. https://groups.google.com/forum/#!topic/scala-salat/s3Q548NM8yc
But may be there exists some round way to do it ? The real problem is that I have a rather deep nested case class model wich describes my Mongo datamodel and i can not just change serialisation to custom implementation.
May be I can build some custom Transformer direct for Map[MyEnum.Value,Boolean] but how ?