Skip to content

Commit 94f1755

Browse files
authored
BigDecimal converts to BsonDecimal128
1 parent ec1cc02 commit 94f1755

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scala/com/sfxcode/nosql/mongo/bson/BsonConverter.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ object BsonConverter {
4141
case bi: BigInteger => BsonInt64(bi.longValue())
4242
case d: Double => BsonDouble(d)
4343
case f: Float => BsonDouble(f)
44-
case bd: BigDecimal => BsonDouble(bd.doubleValue())
45-
case bd: java.math.BigDecimal => BsonDouble(bd.doubleValue())
44+
case bd: BigDecimal => BsonDecimal128(bd)
45+
case bd: java.math.BigDecimal => BsonDecimal128(bd)
4646
case doc: Document => BsonDocument(doc)
4747
case map: Map[_, _] =>
4848
var doc = Document()

0 commit comments

Comments
 (0)