>
> row.field.isEmpty (using the Mapper classes)
You can check if a value is null by using:
scala> var c = null
c: Null = null
scala> Box.legacyNullTest(c)
res11: net.liftweb.common.Box[Null] = Empty
so you can use that and if you get a null value, the result is Empty
the other results would be:
scala> var c = ""
c: java.lang.String = ""
scala> Box.legacyNullTest(c)
res12: net.liftweb.common.Box[java.lang.String] = ""
scala> var c = "s"
c: java.lang.String = s
scala> Box.legacyNullTest(c)
res13: net.liftweb.common.Box[java.lang.String] = Full(s)
Regards,
Diego
>
> I get a NullPointerException if the field is not an empty string but is NULL
> in the database. Is there a shorthand/failsafe notation for "field IS NULL OR
> field = ''"?
>
> Thanks
> Tobias
--
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://www.fmpwizard.com