I have a table with nullable column, and when query the null column, it threw error
val row: List[(String,String)] = SQL("select top 10 Spare_Part part,Pricing_Category cat from Price_Point_Base")
.as((str("part"))~ str("cat") map(flatten) *)
I checked the link https://www.playframework.com/documentation/2.0/ScalaAnorm .
It only gives away to handle nullable column using something like
SQL("Select name,indepYear from Country")().map { row =>
row[String]("name") -> row[Option[Int]]("indepYear")
}
But since str("part") is more compact than row[String]("name"), so I'd like to try using str("part"), but how to make str("part") works with nullable column?