How to handle null in Anorm
问题 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"