The table is defined as follows:
CREATE TABLE Session (
id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
something varchar(32),
PRIMARY KEY (id)
);
And my query looks like this:
SQL("SELECT something FROM Session WHERE id={id}").on("id" -> id).as(str("something") ?)
While this gives the correct type (Option[String]
) at compile-time it causes a RuntimeException(UnexpectedNullableFound(SESSION.SOMETHING))
at runtime.
For the record, I'm using Play 1.2.4, Play Scala 0.9.1 and the bundled H2 database.