Is there a way that I can get Scala Anorm to hanlde empty row results?
I just get this error: [RuntimeException: SqlMappingError(No rows when expecting a single one)]
My method:
def findByEmail(email: String): User = {
DB.withConnection { implicit connection=>
SQL("SELECT * FROM users WHERE email = {email}").on(
'email -> email
).as(User.simple.single)
}
}