title: HowTo: Custom Field in Lift-Record-Squeryl
body: <p>I'm trying to make a <code>EnumListField</code> in Lift/Record/Squeryl, similar to <code>MappedEnumList</code> in <code>LiftMapper</code>. The storage type should be Long/BIGINT. I understand that if I define:</p>
  
  <pre><code>def classOfPersistentField = classOf[Long]
  </code></pre>
  
  <p>Then Squeryl will know it should create a BIGINT column. And I know it uses <code>setFromAny()</code> to set the value, passing in the Long. The one piece I don't get is:</p>
  
  <p>How will it read the field's value? If it uses <code>valueBox</code>, it will get a <code>Seq[Enum#Value]</code>, and it won't know how to turn that into a Long. </p>
  
  <p>How do I tell Squeryl to convert my <code>Seq[Enum#Value]</code> to a Long, or define a "getter" that returns a Long, and that doesn't conflict with the "normal" getter(s)?</p>