I want to define a custom type in slick 2.0.0-M2. The type has the base type scala, which is known as slick (e.g. String). In Slick 1.0.0, I could do something like:
class Test[UnderlyingType : TypeMapper] {
case class MyType(elem: UnderlyingType)
implicit val typeMapper = MappedTypeMapper.base[MyType, UnderlyingType](_.elem, t=>MyType(t))
}
(the code above was not tested, but my implementation was like this)
How does it work in slick 2.0.0-M2? The MappedTypeMapper class has disappeared ...
source
share