It is called MappedColumnType
now. Also see https://groups.google.com/d/msg/scalaquery/4Ns_J_8wbqQ/0SGiJL4O8A8J
slick 2.0.0-M2: How to define custom types (MappedTypeMapper in slick 1.0.0)?
-
30-06-2022 - |
题
I want to define a custom type in slick 2.0.0-M2. The type has an underlying scala type that is known to slick (for example 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))
}
(code above not tested, but my implementation was similar to that)
How does this work in slick 2.0.0-M2? The MappedTypeMapper class vanished...
解决方案
不隶属于 StackOverflow