I am trying to create an EnumListField in Lift / Record / Squeryl, similar to MappedEnumList in LiftMapper. Storage type must be long / BIGINT. I understand that if I define:
def classOfPersistentField = classOf[Long]
Squeryl will then know that it must create a BIGINT column. And I know that it uses setFromAny () to set the value passing in Long. The only thing I do not get is:
How will he read the value of the field? If he uses a valueBox, he will get Seq [Enum # Value], and he will not know how to turn it into Long.
How do I pass Squeryl to convert my Seq [Enum # Value] to Long, or define a โgetterโ that returns Long and does not conflict with a โnormalโ getter (s)?
scala record lift squeryl
Sebastien Diot Apr 17 '11 at 11:40 2011-04-17 11:40
source share