Permalink
Browse files

Merge pull request #905 from phidias/master

anorm.Pk case is not handled by anyParameter method
  • Loading branch information...
2 parents 57864d3 + 94bad0c commit e94c81e33567bed1ceacb9e96e87f7ff8778d5ff @nraychaudhuri nraychaudhuri committed Mar 26, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 framework/src/anorm/src/main/scala/anorm/Anorm.scala
@@ -330,6 +330,8 @@ object ToStatement {
case None => stmt.setObject(index, null)
case bd: java.math.BigDecimal => stmt.setBigDecimal(index, bd)
case date: java.util.Date => stmt.setTimestamp(index, new java.sql.Timestamp(date.getTime()))
+ case Id(id) => stmt.setObject(index, id)
+ case NotAssigned => stmt.setObject(index, null)
case o => stmt.setObject(index, o)
}
stmt

0 comments on commit e94c81e

Please sign in to comment.