Skip to content
Permalink
Browse files

Fixed issue #698 (MappedColumnType broken for Char)

  • Loading branch information
Radsaggi
Radsaggi committed Mar 13, 2014
1 parent f85c9c5 commit e2ab531d257a17932c6fa75021739945fcdc8947
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/scala/scala/slick/driver/JdbcTypesComponent.scala
@@ -213,7 +213,7 @@ trait JdbcTypesComponent extends RelationalTypesComponent { driver: JdbcDriver =
def setOption(v: Option[Char], p: PositionedParameters) = stringJdbcType.setOption(v.map(String.valueOf), p)
def nextValue(r: PositionedResult) = {
val s = stringJdbcType.nextValue(r)
if(s.isEmpty) ' ' else s.charAt(0)
if(s == null || s.isEmpty) ' ' else s.charAt(0)
}
def updateValue(v: Char, r: PositionedResult) = stringJdbcType.updateValue(String.valueOf(v), r)
override def valueToSQLLiteral(v: Char) = stringJdbcType.valueToSQLLiteral(String.valueOf(v))

0 comments on commit e2ab531

Please sign in to comment.
You can’t perform that action at this time.