I have an enum type
object UserState extends Enumeration {
type UserState = Value
val unconfirmed = Value("unconfirmed")
val locked = Value("locked")
val active = Value("active")
}
class User {
val state: UserState.Value
}
And try to execute query
from(MySchema.users)
(u => where(u.state === UserState.unconfirmed) select(u))
.headOption
But the resulting sql have something like users.state = 0
instead of users.state = 'unconfirmed'
. How to have squeryl treat enum as string rather then int?
And also this is a lift-based application. And I try to use EnumFeild of squeryl-record. May be there a lift-based desigion does exist?