I would like to define a new Column/converter to marshal a case class to a primitive type and back again using phantom dsl.
in slick 3.1.1 I can do this easily:
implicit val idTypeMapper = MappedColumnType.base[Id, Long](
{ (v) ⇒ v.value },
{ (s) ⇒ Id(s) }
)
This allows me to use the Id
anywhere in a slick query and it will be implicitly converted back and forth.
I have tried to derive my own Columns and conversions in phantom by extending AbstractColumn
(and other) but with no luck.
How do I do this in phantom dsl.