Permalink
Browse files

JdbcModelBuilder handles normal BigDecimal defaults

  • Loading branch information...
1 parent f205442 commit 34de035128ca0cba538b2835414f15ae21aafa70 @rbellamy rbellamy committed Sep 11, 2016
Showing with 1 addition and 2 deletions.
  1. +1 −2 slick/src/main/scala/slick/jdbc/PostgresProfile.scala
@@ -106,8 +106,7 @@ trait PostgresProfile extends JdbcProfile {
case (NumericPattern(v),"Long") => Some(Some(v.toLong))
case (NumericPattern(v),"Float") => Some(Some(v.toFloat))
case (NumericPattern(v),"Double") => Some(Some(v.toDouble))
- case (NumericPattern(v), "scala.math.BigDecimal") => Some(Some(v))
- case (v, "scala.math.BigDecimal") => Some(Some(v))
+ case (NumericPattern(v), "scala.math.BigDecimal") => Some(Some(BigDecimal(s"$v")))
case (UUIDPattern(v),"java.util.UUID") => Some(Some(java.util.UUID.fromString(v)))
case (_,"java.util.UUID") => None // The UUID is generated through a function - treat it as if there was no default.
}.getOrElse{

0 comments on commit 34de035

Please sign in to comment.