BigDecimal not getting converted to Double

11 views
Skip to first unread message

rpr...@sprypoint.com

unread,
Nov 24, 2014, 10:24:38 AM11/24/14
to scala...@googlegroups.com
I have the following classes and bMap values are not getting converted to Doubles, but remain as scala.math.BigDecimal.  This causes a failure for the bsonencoder.  Is this expected?

case class B(a: Option[BigDecimal] = None, bMap: Map[String, Option[BigDecimal]])
case class A(@Key("_id") id: ObjectId, a: String, b: Boolean, c: Integer, dMap: Map[String, B])

rose katherine toomey

unread,
Nov 25, 2014, 11:12:56 AM11/25/14
to scala...@googlegroups.com
Hi, a map whose value is an option is not supported.  Make the value of the map a BigDecimal and everything should work as expected;

--
You received this message because you are subscribed to the Google Groups "scala-salat" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-salat...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages